mirror of https://github.com/mpv-player/mpv
Fix memory leak that tmp allocated but maybe not used.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25342 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
8c0a903ccb
commit
24dafeee09
|
@ -1170,11 +1170,13 @@ int demuxer_seek_chapter(demuxer_t *demuxer, int chapter, int mode, float *seek_
|
|||
}
|
||||
|
||||
if(chapter_name) {
|
||||
char *tmp = malloc(16);
|
||||
*chapter_name = NULL;
|
||||
if(num_chapters && *num_chapters && tmp) {
|
||||
sprintf(tmp, " of %3d", *num_chapters);
|
||||
*chapter_name = tmp;
|
||||
if (num_chapters && *num_chapters) {
|
||||
char *tmp = malloc(16);
|
||||
if (tmp) {
|
||||
sprintf(tmp, " of %3d", *num_chapters);
|
||||
*chapter_name = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue