[vlc-commits] darwin/dirs: Fix memory leak in error case

Marvin Scholz git at videolan.org
Tue Mar 20 14:25:02 CET 2018


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Tue Mar 20 14:23:16 2018 +0100| [9b345dac14e3c3ba90f01bf366d6dbf4514f5bc6] | committer: Marvin Scholz

darwin/dirs: Fix memory leak in error case

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9b345dac14e3c3ba90f01bf366d6dbf4514f5bc6
---

 src/darwin/dirs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/darwin/dirs.c b/src/darwin/dirs.c
index e6b76bb5ae..de95ef31dc 100644
--- a/src/darwin/dirs.c
+++ b/src/darwin/dirs.c
@@ -183,6 +183,8 @@ static char *getAppDependentDir(vlc_userdir_t type)
                 Boolean ret = CFStringGetCString(identifierAsNS, identifier, size, kCFStringEncodingUTF8);
                 if (ret)
                     name = identifier;
+                else
+                    free(identifier);
             }
         }
     }



More information about the vlc-commits mailing list