aboutsummaryrefslogtreecommitdiff
path: root/lib/libgeom/geom_xml2tree.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2005-05-24 10:10:38 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2005-05-24 10:10:38 +0000
commit90d93f71416e829901d1bfe4dbdc552f288c5b88 (patch)
treefc491ded7ff21c3a7c5bd0f176604b5aef620b0a /lib/libgeom/geom_xml2tree.c
parent940c638f935554cae8726f66dc90792beb735622 (diff)
downloadsrc-90d93f71416e829901d1bfe4dbdc552f288c5b88.tar.gz
src-90d93f71416e829901d1bfe4dbdc552f288c5b88.zip
Check for NULL pointer return.
Spotted by: marcus
Notes
Notes: svn path=/head/; revision=146561
Diffstat (limited to 'lib/libgeom/geom_xml2tree.c')
-rw-r--r--lib/libgeom/geom_xml2tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libgeom/geom_xml2tree.c b/lib/libgeom/geom_xml2tree.c
index af4d94f75f4b..7798f44544af 100644
--- a/lib/libgeom/geom_xml2tree.c
+++ b/lib/libgeom/geom_xml2tree.c
@@ -368,6 +368,8 @@ geom_gettree(struct gmesh *gmp)
int error;
p = geom_getxml();
+ if (p == NULL)
+ return (errno);
error = geom_xml2tree(gmp, p);
free(p);
return (error);