summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--async.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/async.c b/async.c
index ec452af..746cfce 100644
--- a/async.c
+++ b/async.c
@@ -75,8 +75,10 @@ static int __redisPushCallback(redisCallbackList *list, redisCallback *source) {
/* Copy callback from stack to heap */
cb = calloc(1,sizeof(*cb));
if (!cb) redisOOM();
- if (source != NULL)
- memcpy(cb,source,sizeof(*cb));
+ if (source != NULL) {
+ cb->fn = source->fn;
+ cb->privdata = source->privdata;
+ }
/* Store callback in list */
if (list->head == NULL)