diff options
-rw-r--r-- | src/input/pnm.c | 1 | ||||
-rw-r--r-- | src/libspucmml/xine_cmml_decoder.c | 11 | ||||
-rw-r--r-- | src/post/goom/gfontlib.c | 1 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/input/pnm.c b/src/input/pnm.c index bf24e5f8f..1bbc93fb6 100644 --- a/src/input/pnm.c +++ b/src/input/pnm.c @@ -712,6 +712,7 @@ pnm_t *pnm_connect(xine_stream_t *stream, const char *mrl) { if (strncmp(mrl,"pnm://",6)) { + free (mrl_ptr); return NULL; } diff --git a/src/libspucmml/xine_cmml_decoder.c b/src/libspucmml/xine_cmml_decoder.c index ed7e99ae1..87edcfbfe 100644 --- a/src/libspucmml/xine_cmml_decoder.c +++ b/src/libspucmml/xine_cmml_decoder.c @@ -331,9 +331,9 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) { /* how many lines does the anchor text take up? */ this->lines=0; { - int i = 0; - while (*anchor_text) { - if (*anchor_text == '\r' || *anchor_text == '\n') { + int i = 0, index = 0; + while (anchor_text[index]) { + if (anchor_text[index] == '\r' || anchor_text[index] == '\n') { if (i) { /* match a newline and there are chars on the current line ... */ this->text[ this->lines ][i] = '\0'; @@ -342,11 +342,11 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) { } } else { /* found a normal (non-line-ending) character */ - this->text[ this->lines ][i] = *anchor_text; + this->text[ this->lines ][i] = anchor_text[index]; if (i<SUB_BUFSIZE-1) i++; } - anchor_text++; + index++; } /* always NULL-terminate the string */ @@ -355,6 +355,7 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) { this->lines++; } } + free (anchor_text); /* initialize decoder if needed */ if( !this->cached_width || !this->cached_height || !this->cached_img_duration || !this->osd ) { diff --git a/src/post/goom/gfontlib.c b/src/post/goom/gfontlib.c index 2bc366305..f538aad34 100644 --- a/src/post/goom/gfontlib.c +++ b/src/post/goom/gfontlib.c @@ -127,6 +127,7 @@ void gfont_load (void) { font_chars [32] = 0; small_font_chars [32] = 0; free(font_pos); + free(gfont); } void goom_draw_text (Pixel * buf,int resolx,int resoly, |