Instead of checking the return value of calloc(), the check intended
for that would rather check if the pointer passed as an argument.
As that doesn't make much sense, rather actually check calloc()
return value.
Coverity CID:
1490071 Dereference before null check
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
if (len) {
*mount_data = calloc(len + 1, sizeof(char));
- if (!mount_data)
+ if (!(*mount_data))
return ENOMEM;
len = 0;