summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--async.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/async.c b/async.c
index 4409307..323b489 100644
--- a/async.c
+++ b/async.c
@@ -119,11 +119,11 @@ static int __redisPushCallback(redisCallbackList *list, redisCallback *source) {
redisCallback *cb;
/* Copy callback from stack to heap */
- cb = calloc(1,sizeof(*cb));
+ cb = malloc(sizeof(*cb));
if (!cb) redisOOM();
if (source != NULL) {
- cb->fn = source->fn;
- cb->privdata = source->privdata;
+ memcpy(cb,source,sizeof(*cb));
+ cb->next = NULL;
}
/* Store callback in list */