Bug 570 - memory manageing in hint parameters
This commit is contained in:
@ -116,7 +116,7 @@ HINT *hint;
|
|||||||
return head;
|
return head;
|
||||||
hint->next = head;
|
hint->next = head;
|
||||||
hint->type = HINT_PARAMETER;
|
hint->type = HINT_PARAMETER;
|
||||||
hint->data = pname;
|
hint->data = strdup(pname);
|
||||||
hint->value = strdup(value);
|
hint->value = strdup(value);
|
||||||
return hint;
|
return hint;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,7 +49,7 @@ HINT *hint;
|
|||||||
hint = hint_create_parameter(NULL, strdup("name"), "value");
|
hint = hint_create_parameter(NULL, strdup("name"), "value");
|
||||||
ss_info_dassert(NULL != hint, "New hint list should not be null");
|
ss_info_dassert(NULL != hint, "New hint list should not be null");
|
||||||
ss_info_dassert(0 == strcmp("value", hint->value), "Hint value should be correct");
|
ss_info_dassert(0 == strcmp("value", hint->value), "Hint value should be correct");
|
||||||
ss_info_dassert(0 != hint_exists(hint, HINT_PARAMETER), "Hint of parameter type should exist");
|
ss_info_dassert(0 != hint_exists(&hint, HINT_PARAMETER), "Hint of parameter type should exist");
|
||||||
ss_dfprintf(stderr, "\t..done\nFree hints.");
|
ss_dfprintf(stderr, "\t..done\nFree hints.");
|
||||||
if (NULL != hint) hint_free(hint);
|
if (NULL != hint) hint_free(hint);
|
||||||
ss_dfprintf(stderr, "\t..done\n");
|
ss_dfprintf(stderr, "\t..done\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user