[v7,12/13] curl: set s->url to NULL after free.
diff mbox

Message ID 1370499959-8916-13-git-send-email-famz@redhat.com
State New
Headers show

Commit Message

Fam Zheng June 6, 2013, 6:25 a.m. UTC
Signed-off-by: Fam Zheng <famz@redhat.com>
---
 block/curl.c | 1 +
 1 file changed, 1 insertion(+)

Patch
diff mbox

diff --git a/block/curl.c b/block/curl.c
index bce2e8a..50c7188 100644
--- a/block/curl.c
+++ b/block/curl.c
@@ -741,6 +741,7 @@  static void curl_close(BlockDriverState *bs)
     }
 
     g_free(s->url);
+    s->url = NULL;
 }
 
 static int64_t curl_getlength(BlockDriverState *bs)