diff options
author | Moshe Kaplan <me@moshekaplan.com> | 2020-12-26 22:27:43 -0500 |
---|---|---|
committer | AndersBroman <a.broman58@gmail.com> | 2020-12-27 09:58:01 +0000 |
commit | 5778b2403ea4fec9762f961a6ba4dbf33fd2ee05 (patch) | |
tree | a72c42dbda5d15e8743f1f0204744fe10fa76f61 /wiretap/k12text.l | |
parent | fe6b774358e49e08821204d031fd83c164e6e71c (diff) |
wiretap/k12text.l: replace g_malloc with g_new
Replace `g_malloc` with `g_new` to improve
source code readability.
Diffstat (limited to 'wiretap/k12text.l')
-rw-r--r-- | wiretap/k12text.l | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wiretap/k12text.l b/wiretap/k12text.l index 163cf9dbf6..e9aeb4ade2 100644 --- a/wiretap/k12text.l +++ b/wiretap/k12text.l @@ -452,7 +452,7 @@ k12text_open(wtap *wth, int *err, gchar **err_info) return WTAP_OPEN_ERROR; } - k12text = (k12text_t *)g_malloc(sizeof(k12text_t)); + k12text = g_new(k12text_t, 1); wth->priv = (void *)k12text; k12text->next_frame_offset = 0; wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_K12TEXT; |