From: Dennis Schafroth Date: Mon, 30 Apr 2012 12:03:14 +0000 (+0000) Subject: Fix sizeof X-Git-Tag: v1.6.13~1^2~13 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=960132e07ebd3a77da7500cf1f45819b7de390e1;p=pazpar2-moved-to-github.git Fix sizeof --- 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);