The check for NULL is in the wrong position in the "if" error leg. The pointer should be checked for NULL before checking what the value of what the pointer points to is. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>