Просмотр исходного кода

dpkg-deb: Fix a file descriptor leak

Reported-by: Raphael Geissert <atomo64@gmail.com>
Guillem Jover лет назад: 16
Родитель
Сommit
75216988e3
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      dpkg-deb/info.c

+ 2 - 0
dpkg-deb/info.c

@@ -225,6 +225,8 @@ static void info_field(const char *debar, const char *directory,
     if (c == EOF) break;
   }
   if (ferror(cc)) ohshite(_("failed during read of `control' component"));
+  if (fclose(cc))
+    ohshite(_("error closing the '%s' component"), "control");
   if (doing) putc('\n',stdout);
   m_output(stdout, _("<standard output>"));
 }