summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9527aa9)
raw | patch | inline | side by side (parent: 9527aa9)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 29 Jan 2014 20:42:09 +0000 (21:42 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 29 Jan 2014 20:42:09 +0000 (21:42 +0100) |
src/utils/dbi.c | patch | blob | history |
diff --git a/src/utils/dbi.c b/src/utils/dbi.c
index c8eb81616454a3078eb768f16b1affd32b81f1d9..a30f548db2c6661242970d5db6c639b93aa480c8 100644 (file)
--- a/src/utils/dbi.c
+++ b/src/utils/dbi.c
continue;
status = callback(client, num_fields, data, user_data);
- for (i = 0; i < num_fields; ++i) {
- if ((data[i].type == SDB_TYPE_STRING) && (data[i].data.string))
- free(data[i].data.string);
- else if ((data[i].type == SDB_TYPE_BINARY)
- && (data[i].data.binary.datum))
- free(data[i].data.binary.datum);
- }
+ for (i = 0; i < num_fields; ++i)
+ sdb_data_free_datum(&data[i]);
if (status)
continue;