Browse Source

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 years ago
parent
commit
c0058777f3
1 changed files with 4 additions and 0 deletions
  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>"));