summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>2001-10-11 20:39:47 +0000
committerTed Lemon <source@isc.org>2001-10-11 20:39:47 +0000
commitbc4ebba69d11f5f85d0235527d02ef8c90ab41d2 (patch)
tree2b38cdbfe98efcf5274143f1a6b76627a457415f
parent9e9b3ac34cca8221137ac295af84ec6032eb68ed (diff)
downloadisc-dhcp-bc4ebba69d11f5f85d0235527d02ef8c90ab41d2.tar.gz
Don't dump core if the user types close when no object is open.
-rw-r--r--dhcpctl/omshell.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/dhcpctl/omshell.c b/dhcpctl/omshell.c
index 54e85aa8..6311fe7d 100644
--- a/dhcpctl/omshell.c
+++ b/dhcpctl/omshell.c
@@ -429,6 +429,11 @@ int main (int argc, char **argv, char **envp)
break;
}
+ if (!oh) {
+ printf ("not open.\n");
+ skip_to_semi (cfile);
+ break;
+ }
omapi_object_dereference (&oh, MDL);
break;