From 3d8232bf97ce11818fb07813a71136484ea1a44a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 18 Jun 2015 17:33:15 +0200 Subject: fix memory leaks reported by -fsanitize Various small leaks here and there. Nothing particularily big, but still good to fix. Found by the sanitizers while running our testcases. Reported-By: gcc -fsanitize Git-Dch: Ignore --- apt-pkg/contrib/cdromutl.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apt-pkg/contrib/cdromutl.cc') diff --git a/apt-pkg/contrib/cdromutl.cc b/apt-pkg/contrib/cdromutl.cc index 6eb917457..428ef0161 100644 --- a/apt-pkg/contrib/cdromutl.cc +++ b/apt-pkg/contrib/cdromutl.cc @@ -287,9 +287,11 @@ string FindMountPointForDevice(const char *devnode) fclose(f); // unescape the \0XXX chars in the path string mount_point = out[1]; + free(line); return DeEscapeString(mount_point); } fclose(f); + free(line); } return string(); -- cgit v1.2.3