Code

postgresql plugin: don't exit on malloc failure
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Fri, 4 Dec 2015 20:40:16 +0000 (21:40 +0100)
committerFlorian Forster <octo@collectd.org>
Sat, 5 Dec 2015 07:51:03 +0000 (08:51 +0100)
Signed-off-by: Florian Forster <octo@collectd.org>
src/postgresql.c

index c240e5438297b28e29e7b04d7f1180dd102a979b..e613662ae1510893cd6df91ae6652c503e1e238f 100644 (file)
@@ -1042,7 +1042,7 @@ static int config_query_param_add (udb_query_t *q, oconfig_item_t *ci)
 
        data = udb_query_get_user_data (q);
        if (NULL == data) {
-               data = (c_psql_user_data_t *) smalloc (sizeof (*data));
+               data = (c_psql_user_data_t *) malloc (sizeof (*data));
                if (NULL == data) {
                        log_err ("Out of memory.");
                        return -1;