avformat/os_support: Use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-12-22 11:49:35 +01:00
parent 41ee459e88
commit 5dfae3f40a
1 changed files with 3 additions and 3 deletions

View File

@ -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,