浏览代码

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 16 年之前
父节点
当前提交
e911889c9f
共有 1 个文件被更改,包括 1 次插入0 次删除
  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 {
     else {
       if (write(p1[1], fi->fn, strlen(fi->fn)+1) ==- 1)
       if (write(p1[1], fi->fn, strlen(fi->fn)+1) ==- 1)
 	ohshite(_("failed to write filename to tar pipe (data)"));
 	ohshite(_("failed to write filename to tar pipe (data)"));
+      file_info_free(fi);
     }
     }
   close(p3[0]);
   close(p3[0]);
   subproc_wait_check(c3, "find", 0);
   subproc_wait_check(c3, "find", 0);