diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-10-16 15:42:18 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-10-16 17:12:37 +0200 |
commit | c9833fc33a493b97f675ca666ea314aadae4b7d6 (patch) | |
tree | 36f9563d53ae3a3eaf4ef07bc1789e82f4e7fbfe | |
parent | 885158c887384c6da247cc061458f2e53367e6b5 (diff) | |
download | ffmpeg-c9833fc33a493b97f675ca666ea314aadae4b7d6.tar.gz |
av_tempfile: fix alloc type for !HAVE_MKSTEMP
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavutil/file.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavutil/file.c b/libavutil/file.c index 4d14292ba1..7be095b1f4 100644 --- a/libavutil/file.c +++ b/libavutil/file.c @@ -133,7 +133,10 @@ void av_file_unmap(uint8_t *bufptr, size_t size) int av_tempfile(const char *prefix, char **filename) { int fd=-1; #if !HAVE_MKSTEMP - *filename = tempnam(".", prefix); + void *ptr= tempnam(".", prefix); + *filename = av_strdup(ptr); +#undef free + free(ptr); #else size_t len = strlen(prefix) + 12; /* room for "/tmp/" and "XXXXXX\0" */ *filename = av_malloc(len); |