]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
lldpd: fix a fd leak when we cannot write the new alias
authorVincent Bernat <bernat@luffy.cx>
Wed, 3 Jul 2013 21:02:06 +0000 (23:02 +0200)
committerVincent Bernat <bernat@luffy.cx>
Wed, 3 Jul 2013 21:02:06 +0000 (23:02 +0200)
src/daemon/priv-linux.c

index 8a762bcd1246b5b36a4f0aca5133bbb2e2cbfe0b..fef0a1f9f4864d8fda409ef7d30e35c0dc27c551 100644 (file)
@@ -247,6 +247,7 @@ asroot_iface_description_os(const char *name, const char *description)
        if (fputs(descr, fp) == EOF) {
                log_debug("privsep", "cannot set interface description for %s",
                    name);
+               fclose(fp);
                return -1;
        }
        fclose(fp);