diff options
author | ulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-08-05 23:58:58 +0000 |
---|---|---|
committer | ulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-08-05 23:58:58 +0000 |
commit | fda2349eb97dcdf2f201b4afb6b38b36e2f85eb7 (patch) | |
tree | cb3c54c2b0f0cac5cf1c2e1cb602d09ad46ec3d1 /capture_stop_conditions.c | |
parent | 00a37ae5682151028abffad0540a98826b8d1683 (diff) |
replace malloc and alike calls by their GLib pendants -> g_malloc
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15232 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'capture_stop_conditions.c')
-rw-r--r-- | capture_stop_conditions.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/capture_stop_conditions.c b/capture_stop_conditions.c index 1eb7a443cd..6c1b9e83c7 100644 --- a/capture_stop_conditions.c +++ b/capture_stop_conditions.c @@ -84,7 +84,7 @@ typedef struct _cnd_timeout_dat{ static condition* _cnd_constr_timeout(condition* cnd, va_list ap){ cnd_timeout_dat *data = NULL; /* allocate memory */ - if((data = (cnd_timeout_dat*)malloc(sizeof(cnd_timeout_dat))) == NULL) + if((data = (cnd_timeout_dat*)g_malloc(sizeof(cnd_timeout_dat))) == NULL) return NULL; /* initialize user data */ data->start_time = time(NULL); @@ -101,7 +101,7 @@ static condition* _cnd_constr_timeout(condition* cnd, va_list ap){ */ static void _cnd_destr_timeout(condition* cnd){ /* free memory */ - free(cnd_get_user_data(cnd)); + g_free(cnd_get_user_data(cnd)); } /* END _cnd_destr_timeout() */ /* @@ -159,7 +159,7 @@ typedef struct _cnd_capturesize_dat{ static condition* _cnd_constr_capturesize(condition* cnd, va_list ap){ cnd_capturesize_dat *data = NULL; /* allocate memory */ - if((data = (cnd_capturesize_dat*)malloc(sizeof(cnd_capturesize_dat))) == NULL) + if((data = (cnd_capturesize_dat*)g_malloc(sizeof(cnd_capturesize_dat))) == NULL) return NULL; /* initialize user data */ data->max_capture_size = va_arg(ap, long); @@ -175,7 +175,7 @@ static condition* _cnd_constr_capturesize(condition* cnd, va_list ap){ */ static void _cnd_destr_capturesize(condition* cnd){ /* free memory */ - free(cnd_get_user_data(cnd)); + g_free(cnd_get_user_data(cnd)); } /* END _cnd_destr_capturesize() */ /* |