diff options
author | Mans Rullgard <mans@mansr.com> | 2012-10-13 01:20:09 +0400 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-10-13 02:51:12 +0400 |
commit | 0daac647af00b7cf591d1360115a725e300ca3b2 (patch) | |
tree | e23dee2bfd2386d78044fabb5e623114e340199b /libavutil | |
parent | 0a7005bebd23ade7bb852bce0401af1a8fdbb723 (diff) |
avstring-test: fix memory leaks
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/avstring.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavutil/avstring.c b/libavutil/avstring.c index 9b88c0b3dd..6b3a65c7f0 100644 --- a/libavutil/avstring.c +++ b/libavutil/avstring.c @@ -197,10 +197,12 @@ int main(void) }; for (i=0; i < FF_ARRAY_ELEMS(strings); i++) { - const char *p= strings[i]; + const char *p = strings[i], *q; printf("|%s|", p); - printf(" -> |%s|", av_get_token(&p, ":")); + q = av_get_token(&p, ":"); + printf(" -> |%s|", q); printf(" + |%s|\n", p); + av_free(q); } } |