Fix memleak in example

This commit is contained in:
Tim Rühsen
2019-04-14 19:08:07 +02:00
committed by Christian Grothoff
parent 1f1f8a50be
commit 3b57d62c21
+1 -1
View File
@@ -101,8 +101,8 @@ read_cb (void *cls, uint64_t pos, char *mem, size_t size)
else
{
memcpy (mem, buf, size);
free (buf);
}
free (buf); // buf may be set even on error return
done:
free (src);
return size;