Przeglądaj źródła

dpkg-query: Fix short-lived memory leak in --show and --list commands

Sponsored-by: Linaro Limited

Signed-off-by: Guillem Jover <guillem@debian.org>
Raphaël Hertzog 15 lat temu
rodzic
commit
c0058777f3
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      src/querycmd.c

+ 4 - 0
src/querycmd.c

@@ -247,6 +247,8 @@ listpackages(const char *const *argv)
         failures++;
       }
     }
+
+    free(found);
   }
 
   m_output(stdout, _("<standard output>"));
@@ -513,6 +515,8 @@ showpackages(const char *const *argv)
         failures++;
       }
     }
+
+    free(found);
   }
 
   m_output(stdout, _("<standard output>"));