diff --git a/cel/cel_pgsql.c b/cel/cel_pgsql.c
index f7676f88ead52d29b1b61f00857db310c4836716..5885a1d32be248c5f0bbc8ace49412bc9b7f2adc 100644
--- a/cel/cel_pgsql.c
+++ b/cel/cel_pgsql.c
@@ -332,6 +332,7 @@ static void pgsql_log(const struct ast_event *event, void *userdata)
 			PQclear(result);
 			goto ast_log_cleanup;
 		}
+		PQclear(result);
 
 ast_log_cleanup:
 		ast_free(sql);