use g_free(), not free() (so it works under windows)
This commit is contained in:
parent
a59bc65c10
commit
92280ccd7e
|
@ -1165,7 +1165,7 @@ static void free_node_list_item(gpointer node, gpointer unused)
|
||||||
static void free_string_list_item(char *string, gpointer unused)
|
static void free_string_list_item(char *string, gpointer unused)
|
||||||
{
|
{
|
||||||
if (string != NULL)
|
if (string != NULL)
|
||||||
free(string);
|
g_free(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void free_xml_list_item(xmlNode *xmlnode, gpointer unused)
|
static void free_xml_list_item(xmlNode *xmlnode, gpointer unused)
|
||||||
|
@ -1243,7 +1243,7 @@ static void set_node_list(GList **nodeListPointer, GPtrArray *nodeArray) {
|
||||||
static void set_string(char **pointer, char *value)
|
static void set_string(char **pointer, char *value)
|
||||||
{
|
{
|
||||||
if (*pointer != NULL)
|
if (*pointer != NULL)
|
||||||
free(*pointer);
|
g_free(*pointer);
|
||||||
*pointer = value == NULL ? NULL : strdup(value);
|
*pointer = value == NULL ? NULL : strdup(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1573,7 +1573,7 @@ typedef struct {
|
||||||
void setItem(int index, char *item) {
|
void setItem(int index, char *item) {
|
||||||
char **itemPointer = (char **) &g_ptr_array_index(self, index);
|
char **itemPointer = (char **) &g_ptr_array_index(self, index);
|
||||||
if (*itemPointer != NULL)
|
if (*itemPointer != NULL)
|
||||||
free(*itemPointer);
|
g_free(*itemPointer);
|
||||||
if (item == NULL)
|
if (item == NULL)
|
||||||
*itemPointer = NULL;
|
*itemPointer = NULL;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue