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:
Peng 2013-11-08 22:47:20 +08:00 committed by Marcelo Roberto Jimenez
parent a65f3cebb3
commit 82cf12b9ed
2 changed files with 8 additions and 1 deletions

View File

@ -357,6 +357,14 @@ Version 1.8.0
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>
Fix return value check of parse_uri.

View File

@ -416,7 +416,6 @@ static int check_soap_action_header(
temp_header_value = malloc(soap_action_header->value.length + 1);
if (!temp_header_value) {
ret_code = UPNP_E_OUTOF_MEMORY;
free(temp_header_value);
return ret_code;
}
strncpy(temp_header_value, soap_action_header->value.buf,