summaryrefslogtreecommitdiffstats
path: root/stream/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/url.c')
-rw-r--r--stream/url.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/stream/url.c b/stream/url.c
index c898d092b5..c505ab99d8 100644
--- a/stream/url.c
+++ b/stream/url.c
@@ -101,15 +101,12 @@ url_new(const char* url) {
}
// Create the URL container
- Curl = malloc(sizeof(URL_t));
+ Curl = calloc(1, sizeof(*Curl));
if( Curl==NULL ) {
mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n");
goto err_out;
}
- // Initialisation of the URL container members
- memset( Curl, 0, sizeof(URL_t) );
-
url_escape_string(escfilename,url);
// Copy the url in the URL container