aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-10-12 22:20:09 +0100
committerMans Rullgard <mans@mansr.com>2012-10-12 23:51:12 +0100
commit0daac647af00b7cf591d1360115a725e300ca3b2 (patch)
treee23dee2bfd2386d78044fabb5e623114e340199b /libavutil
parent0a7005bebd23ade7bb852bce0401af1a8fdbb723 (diff)
downloadffmpeg-0daac647af00b7cf591d1360115a725e300ca3b2.tar.gz
avstring-test: fix memory leaks
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/avstring.c6
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);
}
}