summaryrefslogtreecommitdiffstats
path: root/stream/network.c
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-11-07 12:47:40 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-08 18:05:12 +0200
commit12d3e0df9980822282f70dffad148b729dbee541 (patch)
treed298b2c8f5039eae7aeeb16dfd927bea0efcc134 /stream/network.c
parentaf4b23cd36cff0dc34cde59c6a154fd080d11216 (diff)
downloadmpv-12d3e0df9980822282f70dffad148b729dbee541.tar.bz2
mpv-12d3e0df9980822282f70dffad148b729dbee541.tar.xz
cleanup: don't check for NULL before free()
patch by Clément Bœsch, ubitux gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32598 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/network.c')
-rw-r--r--stream/network.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/stream/network.c b/stream/network.c
index cbf643a6f2..d614774a96 100644
--- a/stream/network.c
+++ b/stream/network.c
@@ -128,9 +128,9 @@ void
streaming_ctrl_free( streaming_ctrl_t *streaming_ctrl ) {
if( streaming_ctrl==NULL ) return;
if( streaming_ctrl->url ) url_free( streaming_ctrl->url );
- if( streaming_ctrl->buffer ) free( streaming_ctrl->buffer );
- if( streaming_ctrl->data ) free( streaming_ctrl->data );
- free( streaming_ctrl );
+ free(streaming_ctrl->buffer);
+ free(streaming_ctrl->data);
+ free(streaming_ctrl);
}
URL_t*
@@ -338,14 +338,10 @@ http_authenticate(HTTP_header_t *http_hdr, URL_t *url, int *auth_retry) {
return -1;
}
if( *auth_retry>0 ) {
- if( url->username ) {
- free( url->username );
- url->username = NULL;
- }
- if( url->password ) {
- free( url->password );
- url->password = NULL;
- }
+ free(url->username);
+ url->username = NULL;
+ free(url->password);
+ url->password = NULL;
}
aut = http_get_field(http_hdr, "WWW-Authenticate");