libsparse: Fix null pointer issue

Fix the issue that "out" pointer is dereferenced without checking.

Change-Id: I76a57ad7309841218231346f4807ef2be8628737
Signed-off-by: Hong-Mei Li <a21834@motorola.com>
diff --git a/libsparse/output_file.c b/libsparse/output_file.c
index b5ae419..5014e4a 100644
--- a/libsparse/output_file.c
+++ b/libsparse/output_file.c
@@ -675,6 +675,9 @@
 	} else {
 		out = output_file_new_normal();
 	}
+	if (!out) {
+		return NULL;
+	}
 
 	out->ops->open(out, fd);