Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Unified Diff: src/libmtp.c

Issue 12041060: libmtp: Fix some leaks in common code paths. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libmtp/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « patches/16_fix_leaks.patch ('k') | src/libusb1-glue.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/libmtp.c
===================================================================
--- src/libmtp.c (revision 178434)
+++ src/libmtp.c (working copy)
@@ -1778,6 +1778,8 @@
char *minorstr = strndup(element + i + 1, strlen(element) - i - 1);
major = atoi(majorstr);
minor = atoi(minorstr);
+ free(majorstr);
+ free(minorstr);
extension = malloc(sizeof(LIBMTP_device_extension_t));
extension->name = name;
extension->major = major;
« no previous file with comments | « patches/16_fix_leaks.patch ('k') | src/libusb1-glue.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698