summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f35b2b3)
raw | patch | inline | side by side (parent: f35b2b3)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 16:09:08 +0000 (18:09 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 16:09:08 +0000 (18:09 +0200) |
src/postgresql.c | patch | blob | history |
diff --git a/src/postgresql.c b/src/postgresql.c
index d532906cc6063c499ebc7f32fccd6d97b78c53a9..6cf563181ab662099fe4f7a75ab76f257fec532e 100644 (file)
--- a/src/postgresql.c
+++ b/src/postgresql.c
data = udb_query_get_user_data (q);
if (NULL == data) {
- data = malloc (sizeof (*data));
+ data = calloc (1, sizeof (*data));
if (NULL == data) {
log_err ("Out of memory.");
return -1;
}
- memset (data, 0, sizeof (*data));
data->params = NULL;
data->params_num = 0;