summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Friloux <guillaume.friloux@gmail.com>2014-05-21 09:12:09 +0200
committerGuillaume Friloux <guillaume.friloux@gmail.com>2014-05-21 09:12:09 +0200
commit2ad9ccca77136b29406ec321e31da20dd688b25f (patch)
tree141a47db59d87c32dd972301fd33a0965e27aac8
parent4dc8b95543d0b13a4d0b5dbec369e905efe460eb (diff)
Fix a memset over a struct with size of pointer instead of struct.
-rw-r--r--src/lib/esql_res.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/esql_res.c b/src/lib/esql_res.c
index 20f93d2..918492f 100644
--- a/src/lib/esql_res.c
+++ b/src/lib/esql_res.c
@@ -77,7 +77,7 @@ _esql_res_free(Esql_Res *res)
77 /* memset is not needed, but leave it here to find if people 77 /* memset is not needed, but leave it here to find if people
78 * kept reference to values after row is removed, see below. 78 * kept reference to values after row is removed, see below.
79 */ 79 */
80 memset(res->desc, 0, sizeof(res->desc)); 80 memset(res->desc, 0, sizeof(*res->desc));
81 free(res->desc); 81 free(res->desc);
82 82
83 /* NOTE: after this point, if users are still holding 'desc' they will 83 /* NOTE: after this point, if users are still holding 'desc' they will