g10: Fix keybox-related memory leaks.
[gnupg.git] / g10 / mdfilter.c
index 708bdcd..0dbbc3c 100644 (file)
@@ -22,7 +22,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
-#include <assert.h>
 
 #include "gpg.h"
 #include "status.h"
@@ -58,7 +57,7 @@ md_filter( void *opaque, int control,
        *ret_len = i;
     }
     else if( control == IOBUFCTRL_DESC )
-       *(char**)buf = "md_filter";
+        mem2str (buf, "md_filter", *ret_len);
     return rc;
 }