Opened 11 years ago

Closed 9 years ago

#1342 closed defect (fixed)

libmpdemux/demux_gif.c:246: Memory leak: priv

Reported by: dvice_null@… Owned by: reimar
Priority: normal Component: demuxer
Version: HEAD Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

In file libmpdemux/demux_gif.c:246
Variable priv is leaking memory when return NULL; is called.

gif_priv_t *priv = calloc(1, sizeof(gif_priv_t));
sh_video_t *sh_video = NULL;
GifFileType? *gif = NULL;

priv->current_pts = 0;
demuxer->seekable = 0; FIXME

go back to the beginning
stream_seek(demuxer->stream,demuxer->stream->start_pos);

#ifdef CONFIG_GIF_TVT_HACK

lseek(demuxer->stream->fd, 0, SEEK_SET);
gif = DGifOpenFileHandle(demuxer->stream->fd);

#else

gif = DGifOpen(demuxer->stream, my_read_gif);

#endif

if (!gif) {

PrintGifError?();
return NULL;

}

Change History (2)

comment:1 Changed 9 years ago by compn

  • Owner changed from r_togni@… to reimar

comment:2 Changed 9 years ago by reimar

  • Resolution set to fixed
  • Status changed from new to closed

Fixed this and another leak in SVN r32701.

Note: See TracTickets for help on using tickets.