projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
24ad044
)
fix memleak
author
Michael Wallner
<mike@php.net>
Wed, 28 Apr 2010 06:53:08 +0000
(06:53 +0000)
committer
Michael Wallner
<mike@php.net>
Wed, 28 Apr 2010 06:53:08 +0000
(06:53 +0000)
http_message_object.c
patch
|
blob
|
history
diff --git
a/http_message_object.c
b/http_message_object.c
index 60fd8dfafddf2e9ef971381fa727c16d28e375ab..8d1e8470678c55ce4eb3266d5df2b5adae697759 100644
(file)
--- a/
http_message_object.c
+++ b/
http_message_object.c
@@
-1124,10
+1124,11
@@
PHP_METHOD(HttpMessage, setHttpVersion)
convert_to_double(zv);
spprintf(&version, 0, "%1.1F", Z_DVAL_P(zv));
if (strcmp(version, "1.0") && strcmp(version, "1.1")) {
convert_to_double(zv);
spprintf(&version, 0, "%1.1F", Z_DVAL_P(zv));
if (strcmp(version, "1.0") && strcmp(version, "1.1")) {
- http_error_ex(HE_WARNING, HTTP_E_INVALID_PARAM, "Invalid HTTP protocol version (1.0 or 1.1): %s", version);
+ efree(version);
+ http_error_ex(HE_WARNING, HTTP_E_INVALID_PARAM, "Invalid HTTP protocol version (1.0 or 1.1): %g", Z_DVAL_P(zv));
RETURN_FALSE;
}
RETURN_FALSE;
}
-
+ efree(version);
obj->message->http.version = Z_DVAL_P(zv);
RETURN_TRUE;
}
obj->message->http.version = Z_DVAL_P(zv);
RETURN_TRUE;
}