summaryrefslogtreecommitdiffstats
path: root/stream/cookies.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-01-24 14:32:35 +0100
committerwm4 <wm4@nowhere>2013-01-24 14:32:35 +0100
commit570271c7767e924be3d9d347b04508579dfa4d80 (patch)
tree23b55147fcecbd227c8d04ee4466304909916526 /stream/cookies.c
parentc162b6d64d696e2a7bab2dc6b6e6fe19f671e654 (diff)
downloadmpv-570271c7767e924be3d9d347b04508579dfa4d80.tar.bz2
mpv-570271c7767e924be3d9d347b04508579dfa4d80.tar.xz
cookies: fix crash
This was broken in 3f85094 (probably merge mistake). I guess nobody ever uses this feature.
Diffstat (limited to 'stream/cookies.c')
-rw-r--r--stream/cookies.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/stream/cookies.c b/stream/cookies.c
index 78a18284af..d8f8b051f9 100644
--- a/stream/cookies.c
+++ b/stream/cookies.c
@@ -162,10 +162,10 @@ static struct cookie_list_type *load_cookies_from(const char *filename,
struct cookie_list_type
*list)
{
- char *ptr;
+ char *ptr, *file;
int64_t length;
- ptr = load_file(filename, &length);
+ ptr = file = load_file(filename, &length);
if (!ptr)
return list;
@@ -183,7 +183,7 @@ static struct cookie_list_type *load_cookies_from(const char *filename,
list = new;
}
}
- free(ptr);
+ free(file);
return list;
}