1 From 2fb900e9e915f9ec6ac2f233255a0a527da164c2 Mon Sep 17 00:00:00 2001
2 From: "W. Trevor King" <wking@tremily.us>
3 Date: Sun, 23 Aug 2015 21:59:45 -0700
4 Subject: [PATCH 2/7] Free rawdevices after opening the connected device
6 Avoid leaking the raw-device memory. For a similar example in the
7 libmtp source, see LIBMTP_Get_First_Device [1].
9 [1]: http://sourceforge.net/p/libmtp/code/ci/libmtp-1-1-9/tree/src/libmtp.c#l1690
12 1 file changed, 1 insertion(+)
14 diff --git a/mtpfs.c b/mtpfs.c
15 index 286cd24..bdd5f46 100644
18 @@ -1390,6 +1390,7 @@ main (int argc, char *argv[])
20 fprintf(stdout, "Attempting to connect device\n");
21 device = LIBMTP_Open_Raw_Device(&rawdevices[i]);
24 fprintf(stderr, "Unable to open raw device %d\n", i);