From: Michael Biebl Date: Sat, 25 Sep 2021 19:07:17 +0000 (+0200) Subject: Revert "udev: fix memleak" X-Git-Tag: archive/raspbian/247.3-7+rpi1+deb11u6^2~6 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8204030c7749cc15efcb883426b5d34aa665e32f;p=systemd.git Revert "udev: fix memleak" This reverts commit 5dd2b56443e2ed81c238094f516a622804b35518. Gbp-Pq: Topic debian Gbp-Pq: Name Revert-udev-fix-memleak.patch --- diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c index b8b93eeb..2cc78c9e 100644 --- a/src/udev/udev-node.c +++ b/src/udev/udev-node.c @@ -194,7 +194,7 @@ static int link_find_prioritized(sd_device *dev, bool add, const char *stackdir, /* manage "stack of names" with possibly specified device priorities */ static int link_update(sd_device *dev, const char *slink, bool add) { - _cleanup_free_ char *filename = NULL, *dirname = NULL; + _cleanup_free_ char *target = NULL, *filename = NULL, *dirname = NULL; char name_enc[PATH_MAX]; const char *id_filename; int i, r, retries; @@ -237,7 +237,6 @@ static int link_update(sd_device *dev, const char *slink, bool add) { retries = sd_device_get_is_initialized(dev) > 0 ? LINK_UPDATE_MAX_RETRIES : 1; for (i = 0; i < retries; i++) { - _cleanup_free_ char *target = NULL; struct stat st1 = {}, st2 = {}; r = stat(dirname, &st1);