- fix stupidities
[m6w6/ext-http] / http_cookie_api.c
index bc02315e6f9098880f3a6f416d0d4c0487c66222..fb3a9505c438634d03b94082867835f5eaa971d0 100644 (file)
@@ -26,10 +26,10 @@ PHP_MINIT_FUNCTION(http_cookie)
        return SUCCESS;
 }
 
-PHP_HTTP_API http_cookie_list *_http_cookie_list_init(http_cookie_list *list TSRMLS_DC)
+PHP_HTTP_API http_cookie_list *_http_cookie_list_init(http_cookie_list *list ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC TSRMLS_DC)
 {
        if (!list) {
-               list = emalloc(sizeof(http_cookie_list));
+               list = emalloc_rel(sizeof(http_cookie_list));
        }
        
        zend_hash_init(&list->cookies, 0, NULL, ZVAL_PTR_DTOR, 0);
@@ -107,7 +107,7 @@ static inline void _http_cookie_list_set_item_ex(http_cookie_list *list, const c
        } else if (!strcasecmp(key, "domain")) {
                STR_SET(list->domain, estrndup(value, value_len));
        } else if (!strcasecmp(key, "expires")) {
-               const char *date = estrndup(value, value_len);
+               char *date = estrndup(value, value_len);
                list->expires = http_parse_date(date);
                efree(date);
        } else if (!strcasecmp(key, "secure")) {
@@ -321,7 +321,7 @@ failure:
                http_cookie_list_dtor(list);
        }
        efree(s);
-       return FAILURE;
+       return NULL;
 }
 /* }}} */