summaryrefslogtreecommitdiffstats
path: root/src/rest.c
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-06-10 09:37:29 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-06-12 11:42:33 +0200
commitc4d71193a5a520328e508b9c08b2e1130b80ac7c (patch)
treec0415002791f449baf002c8a8eda021eb7399145 /src/rest.c
parent9891276246b96ca1bc43383b3e434a7d8f0ed91f (diff)
rest: fix memory leak in client/update
Free dbi result after use in og_cmd_post_client_update().
Diffstat (limited to 'src/rest.c')
-rw-r--r--src/rest.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rest.c b/src/rest.c
index ec1dda6..b50c423 100644
--- a/src/rest.c
+++ b/src/rest.c
@@ -1986,6 +1986,9 @@ static int og_cmd_post_client_update(json_t *element,
og_dbi_close(dbi);
return -1;
}
+
+ dbi_result_free(result);
+
result = dbi_conn_queryf(dbi->conn,
"UPDATE ordenadores"
" SET numserie='%s',"