From: Thierry FOURNIER Date: Thu, 5 Dec 2013 10:59:55 +0000 (+0100) Subject: MINOR: map: Cleanup the initialisation of map descriptors. X-Git-Tag: v1.5-dev20~155 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a82d202af20f3bd10a426331c19ada6548b97f0f;p=thirdparty%2Fhaproxy.git MINOR: map: Cleanup the initialisation of map descriptors. The association between struct map_descriptor and its struct map_reference must be done in the function map_create_descriptor(). --- diff --git a/src/map.c b/src/map.c index 81c61eb95f..2ed9f3a9f6 100644 --- a/src/map.c +++ b/src/map.c @@ -168,6 +168,7 @@ static struct map_descriptor *map_create_descriptor(struct map_reference *ref, return NULL; desc->conv = conv; + desc->ref = ref; LIST_ADDQ(&ref->maps, &desc->list); @@ -366,7 +367,6 @@ static int sample_load_map(struct arg *arg, struct sample_conv *conv, char **err return 0; } - desc->ref = ref; pattern_init_expr(&desc->pat); /* set the match method */