Null check done for correct pointer.

if (conv == NULL) means conv can be NULL, hence dereferencing it at line no 67 is illegal.
Since memory is allocated to *conv, so Null check should be done on *conv instead of conv.
If want Null check on conv also, it can be done before malloc.