Parcourir la source

dpkg-deb: Fix leak on non-symlink paths when building the package

If it's a symlink it gets inserted into to the symlist, which gets freed
at the end. If it's not we have to free ourselves, which was not being
done.
Guillem Jover il y a 16 ans
Parent
commit
e911889c9f
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      dpkg-deb/build.c

+ 1 - 0
dpkg-deb/build.c

@@ -523,6 +523,7 @@ void do_build(const char *const *argv) {
     else {
       if (write(p1[1], fi->fn, strlen(fi->fn)+1) ==- 1)
 	ohshite(_("failed to write filename to tar pipe (data)"));
+      file_info_free(fi);
     }
   close(p3[0]);
   subproc_wait_check(c3, "find", 0);