Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libalpm/handle.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index 1705ae40..883d943a 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -49,6 +49,8 @@ pmhandle_t *handle_new()
RET_ERR(PM_ERR_MEMORY, NULL);
}
+ memset(handle, 0, sizeof(pmhandle_t));
+
/* see if we're root or not */
handle->uid = geteuid();
if(!handle->uid && getenv("FAKEROOTKEY")) {
@@ -63,20 +65,6 @@ pmhandle_t *handle_new()
handle->access = PM_ACCESS_RO;
}
- handle->trans = NULL;
-
- handle->db_local = NULL;
- handle->dbs_sync = NULL;
-
- handle->logfd = NULL;
-
- handle->root = NULL;
- handle->dbpath = NULL;
- handle->logfile = NULL;
- handle->noupgrade = NULL;
- handle->ignorepkg = NULL;
- handle->usesyslog = 0;
-
return(handle);
}