diff options
author | Moshe Kaplan <me@moshekaplan.com> | 2020-12-22 14:24:09 -0500 |
---|---|---|
committer | AndersBroman <a.broman58@gmail.com> | 2020-12-23 11:47:17 +0000 |
commit | 180b5e5dc0ad393e1af141f4bb5ee66e31ce8d7e (patch) | |
tree | e904bec758915049fd275a90d862d512f88da9be /dumpcap.c | |
parent | 1c7edf49f83815b56367e6d0441445e8a4981a72 (diff) |
Replace more g_malloc with g_new
Replace g_malloc with g_new to improve
source code readability.
Diffstat (limited to 'dumpcap.c')
-rw-r--r-- | dumpcap.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2792,7 +2792,7 @@ capture_loop_open_input(capture_options *capture_opts, loop_data *ld, pcap_src->cap_pipe_state = STATE_EXPECT_REC_HDR; pcap_src->cap_pipe_err = PIPOK; #ifdef _WIN32 - pcap_src->cap_pipe_read_mtx = g_malloc(sizeof(GMutex)); + pcap_src->cap_pipe_read_mtx = g_new(GMutex, 1); g_mutex_init(pcap_src->cap_pipe_read_mtx); pcap_src->cap_pipe_pending_q = g_async_queue_new(); pcap_src->cap_pipe_done_q = g_async_queue_new(); |