aboutsummaryrefslogtreecommitdiff
path: root/dbfp.c
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2016-03-10 18:03:22 +0100
committerRobin Krahl <me@robin-krahl.de>2016-03-10 18:03:22 +0100
commit99319968f3e3ebbdce6c37f04243f734e98b28b3 (patch)
tree9b750ab244fbd2c359999a0432572a57a1c84dd3 /dbfp.c
parent2d3fffa502e808452848b7396b4e121917ddc787 (diff)
downloaddbfp-99319968f3e3ebbdce6c37f04243f734e98b28b3.tar.gz
dbfp-99319968f3e3ebbdce6c37f04243f734e98b28b3.tar.bz2
dbfp: introduce dbfp_location_close
dbfp_location_close releases the resources allocated by a dbfp_location structure. It does not free the structure itself.
Diffstat (limited to 'dbfp.c')
-rw-r--r--dbfp.c9
1 files changed, 9 insertions, 0 deletions
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)
{