aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/assuan-support.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 61bc3949..98de853f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2009-12-15 Marcus Brinkmann <[email protected]>
+
+ * assuan-support.c (my_spawn): Calloc, not malloc, the fd_items.
+
2009-12-10 Werner Koch <[email protected]>
* debug.c (debug_init): Test on sgid process.
diff --git a/src/assuan-support.c b/src/assuan-support.c
index d5defa8a..c4d390ce 100644
--- a/src/assuan-support.c
+++ b/src/assuan-support.c
@@ -130,7 +130,7 @@ my_spawn (assuan_context_t ctx, pid_t *r_pid, const char *name,
}
/* fd_in, fd_out, terminator */
i += 3;
- fd_items = malloc (sizeof (struct spawn_fd_item_s) * i);
+ fd_items = calloc (i, sizeof (struct spawn_fd_item_s));
if (! fd_items)
return -1;
i = 0;