diff options
author | V V <vvaltman@aurum> | 2015-10-12 13:50:22 +0300 |
---|---|---|
committer | V V <vvaltman@aurum> | 2015-10-12 13:50:22 +0300 |
commit | 790bde40a6f5b7db0ee842a3352b29bc7eff8082 (patch) | |
tree | 65f97eb4b45ef3d717d84786215e32e21767e82e /tgl.c | |
parent | 6467a94ee3d9f69b6f23d66221f7bd0d58df7ac2 (diff) |
fixed couple of memory leaks
Diffstat (limited to 'tgl.c')
-rw-r--r-- | tgl.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -106,10 +106,7 @@ void tgl_register_app_id (struct tgl_state *TLS, int app_id, const char *app_has } struct tgl_state *tgl_state_alloc (void) { - struct tgl_state *TLS = (struct tgl_state *)malloc (sizeof (*TLS)); - if (!TLS) { return NULL; } - memset (TLS, 0, sizeof (*TLS)); - return TLS; + return (struct tgl_state *)talloc0 (sizeof (struct tgl_state)); } void tgl_incr_verbosity (struct tgl_state *TLS) { |