Fix several minor bugs in soap_device.c
1) remove redundant free
2) avoid user-provided ErrStr being overwritten by the default one
3) eliminated memory leak possiblity in handle_query_variable
Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
(cherry picked from commit bf60dc06e0
)
Conflicts:
upnp/src/soap/soap_device.c
This commit is contained in:
parent
a65f3cebb3
commit
82cf12b9ed
@ -357,6 +357,14 @@ Version 1.8.0
|
|||||||
Version 1.6.19
|
Version 1.6.19
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
|
|
||||||
|
2013-11-08 Peng <howtofly(at)gmail.com>
|
||||||
|
|
||||||
|
Fix several minor bugs in soap_device.c
|
||||||
|
|
||||||
|
1) remove redundant free
|
||||||
|
2) avoid user-provided ErrStr being overwritten by the default one
|
||||||
|
3) eliminated memory leak possiblity in handle_query_variable
|
||||||
|
|
||||||
2013-11-08 Peng <howtofly(at)gmail.com>
|
2013-11-08 Peng <howtofly(at)gmail.com>
|
||||||
|
|
||||||
Fix return value check of parse_uri.
|
Fix return value check of parse_uri.
|
||||||
|
@ -416,7 +416,6 @@ static int check_soap_action_header(
|
|||||||
temp_header_value = malloc(soap_action_header->value.length + 1);
|
temp_header_value = malloc(soap_action_header->value.length + 1);
|
||||||
if (!temp_header_value) {
|
if (!temp_header_value) {
|
||||||
ret_code = UPNP_E_OUTOF_MEMORY;
|
ret_code = UPNP_E_OUTOF_MEMORY;
|
||||||
free(temp_header_value);
|
|
||||||
return ret_code;
|
return ret_code;
|
||||||
}
|
}
|
||||||
strncpy(temp_header_value, soap_action_header->value.buf,
|
strncpy(temp_header_value, soap_action_header->value.buf,
|
||||||
|
Loading…
Reference in New Issue
Block a user