Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/sync.c
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-04-24 21:36:30 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-04-24 21:36:30 +0000
commitbeda47fd22d204ba7f79ccab5251ed13c3faf82d (patch)
treef583cd91f88526561eda7373bc0a8b1e7cb02349 /lib/libalpm/sync.c
parenta9540e2c7629bd7ecd7e98a562f77e33a289dba9 (diff)
code cleanup
Diffstat (limited to 'lib/libalpm/sync.c')
-rw-r--r--lib/libalpm/sync.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 8d6ee1d0..113fec9d 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -63,14 +63,16 @@ pmsyncpkg_t *sync_new(int type, pmpkg_t *spkg, void *data)
void sync_free(pmsyncpkg_t *sync)
{
- if(sync) {
- if(sync->type == PM_SYNC_TYPE_REPLACE) {
- FREELISTPKGS(sync->data);
- } else {
- FREEPKG(sync->data);
- }
- free(sync);
+ if(sync == NULL) {
+ return;
+ }
+
+ if(sync->type == PM_SYNC_TYPE_REPLACE) {
+ FREELISTPKGS(sync->data);
+ } else {
+ FREEPKG(sync->data);
}
+ free(sync);
}
/* Test for existance of a package in a PMList* of pmsyncpkg_t*