From 99319968f3e3ebbdce6c37f04243f734e98b28b3 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Thu, 10 Mar 2016 18:03:22 +0100 Subject: dbfp: introduce dbfp_location_close dbfp_location_close releases the resources allocated by a dbfp_location structure. It does not free the structure itself. --- dbfp.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'dbfp.c') diff --git a/dbfp.c b/dbfp.c index b36a17c..ec9543b 100644 --- a/dbfp.c +++ b/dbfp.c @@ -91,6 +91,15 @@ void dbfp_close(struct dbfp *dbfp) dbfp->key = NULL; } +void dbfp_location_close(struct dbfp_location *location) +{ + if (!location) + return; + + free(location->name); + free(location->id); +} + int dbfp_query_location_name(struct dbfp *dbfp, char *input, size_t *n, struct dbfp_location **locations) { -- cgit v1.2.1