Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/majn/tgl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tgl.c
diff options
context:
space:
mode:
authorV V <vvaltman@aurum>2015-10-12 13:50:22 +0300
committerV V <vvaltman@aurum>2015-10-12 13:50:22 +0300
commit790bde40a6f5b7db0ee842a3352b29bc7eff8082 (patch)
tree65f97eb4b45ef3d717d84786215e32e21767e82e /tgl.c
parent6467a94ee3d9f69b6f23d66221f7bd0d58df7ac2 (diff)
fixed couple of memory leaks
Diffstat (limited to 'tgl.c')
-rw-r--r--tgl.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/tgl.c b/tgl.c
index 44fdb28..9fb3752 100644
--- a/tgl.c
+++ b/tgl.c
@@ -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) {