lib/axmap: Make axmap_new() more robust
authorBart Van Assche <bart.vanassche@wdc.com>
Wed, 22 Aug 2018 16:00:15 +0000 (09:00 -0700)
committerBart Van Assche <bvanassche@acm.org>
Thu, 23 Aug 2018 01:59:24 +0000 (18:59 -0700)
commit70c0f35624b32a86603c034e28e6b09907868100
tree4de16f7c32cbfb4052d238cda8007ae7b920d2c8
parenta1a4ab815fe74ba54086b92206cf632b6c3aba4c
lib/axmap: Make axmap_new() more robust

Return NULL instead of triggering a segmentation fault if calloc() fails.
Note: calling free(NULL) is safe so it is not necessary to check the
free() argument before calling free().

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
lib/axmap.c