X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=src%2Fbasic%2Fkhash.c;h=b3e1dc444840d05691022f7cb00b3d5fabe851eb;hb=1cc6c93a9569a9f2664d0d26cd0e50408307c430;hp=6463faf3e12ac72a5b9e3edb59765b2fdb1a2fce;hpb=3d282fff063c81893dc4bbd0282193d20dd5357e;p=thirdparty%2Fsystemd.git diff --git a/src/basic/khash.c b/src/basic/khash.c index 6463faf3e12..b3e1dc44484 100644 --- a/src/basic/khash.c +++ b/src/basic/khash.c @@ -216,8 +216,7 @@ int khash_dup(khash *h, khash **ret) { if (copy->fd < 0) return -errno; - *ret = copy; - copy = NULL; + *ret = TAKE_PTR(copy); return 0; }