Mercurial > libavformat.hg
comparison avio.c @ 2710:00ffc2f02705 libavformat
Check context before accessing its field.
Patch by Thorsten Jordan: tjordan macrosystem de
author | benoit |
---|---|
date | Wed, 07 Nov 2007 08:34:00 +0000 |
parents | b21c2af60bc9 |
children | 39cac1b7296e |
comparison
equal
deleted
inserted
replaced
2709:8f923b7f5462 | 2710:00ffc2f02705 |
---|---|
131 } | 131 } |
132 | 132 |
133 int url_close(URLContext *h) | 133 int url_close(URLContext *h) |
134 { | 134 { |
135 int ret; | 135 int ret; |
136 if (!h) return 0; /* can happen when url_open fails */ | |
136 | 137 |
137 ret = h->prot->url_close(h); | 138 ret = h->prot->url_close(h); |
138 av_free(h); | 139 av_free(h); |
139 return ret; | 140 return ret; |
140 } | 141 } |