]> git.sesse.net Git - vlc/commit
libvlc: call exit() if command line help was requested
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 2 Dec 2012 08:17:51 +0000 (10:17 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 2 Dec 2012 08:17:51 +0000 (10:17 +0200)
commit91bef24e89b317d84cae789bd6f075681fc3aa6e
treeeb84c5fb41c2b317a6a0815f9333ed46c3c010cd
parent0c40a30a34ab188c215d43dbcbf29ef1c5b5b6ea
libvlc: call exit() if command line help was requested

A library should not call exit(), but I do not see any easy way around
it: if libvlc_new() returns NULL on error so real errors cannot be
distinguished from --help stuff. Also --daemon already calls exit()
(through daemon()).

This introduces an O(1) memory leak when calling --help. It could be
fixed by merging libvlc_InternalCreate() and libvlc_InternalInit().
src/libvlc.c