If strdup failed, don't try and free the wrong thing.

This commit is contained in:
Peter Wemm 2013-07-01 08:38:31 +00:00
parent 3d4b80da4e
commit 7c5cb6be8c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=252464

View File

@ -96,7 +96,7 @@ _citrus_mapper_create_area(
ma->ma_dir = strdup(area);
if (ma->ma_dir == NULL) {
ret = errno;
free(ma->ma_dir);
free(ma);
goto quit;
}
_CITRUS_HASH_INIT(&ma->ma_cache, CM_HASH_SIZE);