diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-20 22:09:37 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-20 23:01:08 -0500 |
commit | 7267c0947d7e8ae5dff7bafd932c3bc285f43e5c (patch) | |
tree | 9aa05d6e05ed83e67bf014f6745a3081b8407dc5 /slirp/slirp.c | |
parent | 14015304b662e8f8ccce46c5a6927af6a14c510b (diff) | |
download | hqemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.zip hqemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.gz |
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'slirp/slirp.c')
-rw-r--r-- | slirp/slirp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/slirp/slirp.c b/slirp/slirp.c index 2c242ef..655b3f4 100644 --- a/slirp/slirp.c +++ b/slirp/slirp.c @@ -202,7 +202,7 @@ Slirp *slirp_init(int restricted, struct in_addr vnetwork, const char *bootfile, struct in_addr vdhcp_start, struct in_addr vnameserver, void *opaque) { - Slirp *slirp = qemu_mallocz(sizeof(Slirp)); + Slirp *slirp = g_malloc0(sizeof(Slirp)); slirp_init_once(); @@ -222,10 +222,10 @@ Slirp *slirp_init(int restricted, struct in_addr vnetwork, vhostname); } if (tftp_path) { - slirp->tftp_prefix = qemu_strdup(tftp_path); + slirp->tftp_prefix = g_strdup(tftp_path); } if (bootfile) { - slirp->bootp_filename = qemu_strdup(bootfile); + slirp->bootp_filename = g_strdup(bootfile); } slirp->vdhcp_startaddr = vdhcp_start; slirp->vnameserver_addr = vnameserver; @@ -246,9 +246,9 @@ void slirp_cleanup(Slirp *slirp) unregister_savevm(NULL, "slirp", slirp); - qemu_free(slirp->tftp_prefix); - qemu_free(slirp->bootp_filename); - qemu_free(slirp); + g_free(slirp->tftp_prefix); + g_free(slirp->bootp_filename); + g_free(slirp); } #define CONN_CANFSEND(so) (((so)->so_state & (SS_FCANTSENDMORE|SS_ISFCONNECTED)) == SS_ISFCONNECTED) |