From 960132e07ebd3a77da7500cf1f45819b7de390e1 Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Mon, 30 Apr 2012 12:03:14 +0000 Subject: [PATCH] Fix sizeof --- src/pazpar2_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pazpar2_config.c b/src/pazpar2_config.c index ab4382b..0a67bee 100644 --- a/src/pazpar2_config.c +++ b/src/pazpar2_config.c @@ -138,7 +138,7 @@ struct conf_service *service_init(struct conf_server *server, // Setup a dictionary from server. service->dictionary = 0; - service->settings = nmem_malloc(nmem, sizeof(struct settings)); + service->settings = nmem_malloc(nmem, sizeof(*service->settings)); service->settings->num_settings = PZ_MAX_EOF; service->settings->settings = nmem_malloc(nmem, sizeof(struct setting*) * service->settings->num_settings); memset(service->settings->settings, 0, sizeof(struct setting*) * service->settings->num_settings); -- 1.7.10.4