X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftal%2Ftest%2Frun-notifier.c;h=47e436408cbe4ce803951eabb59410e2d6fde1d2;hb=5465da47e3e0f2d09dc34b27cf2f3bc028478df4;hp=150f00adae9e2d60c0df655ff2ac105e34c2c85a;hpb=4c4de2df2c65453b8ca9592ccd21ce1b50f216a7;p=ccan diff --git a/ccan/tal/test/run-notifier.c b/ccan/tal/test/run-notifier.c index 150f00ad..47e43640 100644 --- a/ccan/tal/test/run-notifier.c +++ b/ccan/tal/test/run-notifier.c @@ -13,8 +13,8 @@ static void *my_realloc(void *old, size_t size) void *new = realloc(old, size); if (new == old) { void *p = malloc(size); - memcpy(p, old, size); - free(old); + memcpy(p, new, size); + free(new); new = p; } return new;