revert to use of g_free to make future qemu integrations easier (#695)

* revert to use of g_free to make future qemu integrations easier

* bracing
This commit is contained in:
Chris Eagle
2016-12-21 06:28:36 -08:00
committed by Nguyen Anh Quynh
parent 6a2eb14ff3
commit fccbcfd4c2
48 changed files with 224 additions and 219 deletions

View File

@@ -106,7 +106,7 @@ GHashTable *g_hash_table_ref(GHashTable *hash_table);
guint g_hash_table_size(GHashTable *hash_table);
/* replacement for g_malloc dependency */
#define g_free(x) free(x)
void g_free(void *ptr);
void *g_malloc(size_t size);
void *g_malloc0(size_t size);
void *g_try_malloc0(size_t size);

View File

@@ -57,7 +57,7 @@ struct arm_boot_info {
* sets get_dtb. This will only be used if no dtb file is provided
* by the user. On success, sets *size to the length of the created
* dtb, and returns a pointer to it. (The caller must free this memory
* with free() when it has finished with it.) On failure, returns NULL.
* with g_free() when it has finished with it.) On failure, returns NULL.
*/
void *(*get_dtb)(const struct arm_boot_info *info, int *size);
/* if a board needs to be able to modify a device tree provided by

View File

@@ -210,7 +210,7 @@ void fips_set_state(bool requested);
bool fips_get_state(void);
/* Get the saved exec dir.
* Caller needs to release the returned string by free() */
* Caller needs to release the returned string by g_free() */
char *qemu_get_exec_dir(void);
/**

View File

@@ -1125,7 +1125,7 @@ void object_property_add_link(Object *obj, const char *name,
* @obj: the object to add a property to
* @name: the name of the property
* @get: the getter or NULL if the property is write-only. This function must
* return a string to be freed by free().
* return a string to be freed by g_free().
* @set: the setter or NULL if the property is read-only
* @errp: if an error occurs, a pointer to an area to store the error
*