g13: Fix memleak.
authorWerner Koch <wk@gnupg.org>
Tue, 12 Jul 2016 21:04:39 +0000 (23:04 +0200)
committerWerner Koch <wk@gnupg.org>
Tue, 12 Jul 2016 21:04:39 +0000 (23:04 +0200)
* g13/g13tuple.c (create_tupledesc): Init refcount to 1.
--

The old code somehow assumed that calloc was used.

Signed-off-by: Werner Koch <wk@gnupg.org>
g13/g13tuple.c

index fc6644c..ddcb467 100644 (file)
@@ -114,7 +114,7 @@ create_tupledesc (tupledesc_t *r_desc, void *data, size_t datalen)
   (*r_desc)->data = data;
   (*r_desc)->datalen = datalen;
   (*r_desc)->pos = 0;
-  (*r_desc)->refcount++;
+  (*r_desc)->refcount = 1;
   return 0;
 }