summaryrefslogtreecommitdiff
path: root/libavformat/os_support.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-22 11:49:35 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-22 12:03:34 +0100
commit5dfae3f40a73c69cbca2b7d8d31cbfc6920aa701 (patch)
treea87009fb069596fddf55256517c68dd80257fcc5 /libavformat/os_support.c
parent41ee459e88093a0b7ae13b8539ed9ccd0ebd0f0b (diff)
avformat/os_support: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/os_support.c')
-rw-r--r--libavformat/os_support.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/os_support.c b/libavformat/os_support.c
index f9d6eeaf90..7950e44889 100644
--- a/libavformat/os_support.c
+++ b/libavformat/os_support.c
@@ -159,9 +159,9 @@ void ff_freeaddrinfo(struct addrinfo *res)
}
#endif /* HAVE_WINSOCK2_H */
- av_free(res->ai_canonname);
- av_free(res->ai_addr);
- av_free(res);
+ av_freep(&res->ai_canonname);
+ av_freep(&res->ai_addr);
+ av_freep(&res);
}
int ff_getnameinfo(const struct sockaddr *sa, int salen,