Fix a trunk compilation warning.
authorTilghman Lesher <tilghman@meg.abyt.es>
Mon, 31 Aug 2009 22:02:24 +0000 (22:02 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Mon, 31 Aug 2009 22:02:24 +0000 (22:02 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215070 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/http.c

index ce42c44..674ae36 100644 (file)
@@ -810,12 +810,13 @@ struct ast_variable *ast_http_get_cookies(struct ast_variable *headers)
        struct ast_variable *v, *cookies=NULL;
 
        for (v = headers; v; v = v->next) {
-                if (!strncasecmp(v->name, "Cookie", 6)) {
+               if (!strncasecmp(v->name, "Cookie", 6)) {
+                       char *tmp = ast_strdupa(v->value);
                        if (cookies) {
                                ast_variables_destroy(cookies);
                        }
 
-                       cookies = parse_cookies((char *)v->value);
+                       cookies = parse_cookies(tmp);
                }
        }
        return cookies;