summaryrefslogtreecommitdiff
path: root/src/atcmd.c
diff options
context:
space:
mode:
authorJames Maki <jmaki@multitech.com>2010-05-07 10:52:16 -0500
committerJames Maki <jmaki@multitech.com>2010-05-07 10:52:16 -0500
commit408d03be285010d852fa4234ea03f80e7ee5403a (patch)
treee08b848fc0662813de77b867f7d6eaf80bab1cb6 /src/atcmd.c
parentcce54aff649a226b987a13638f8dfcc56179d64a (diff)
downloadsms-utils-408d03be285010d852fa4234ea03f80e7ee5403a.tar.gz
sms-utils-408d03be285010d852fa4234ea03f80e7ee5403a.tar.bz2
sms-utils-408d03be285010d852fa4234ea03f80e7ee5403a.zip
clean up some memory
Diffstat (limited to 'src/atcmd.c')
-rw-r--r--src/atcmd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/atcmd.c b/src/atcmd.c
index e153d39..95d86dc 100644
--- a/src/atcmd.c
+++ b/src/atcmd.c
@@ -1139,6 +1139,11 @@ int sms_device_open(void)
int fd = -1;
int tmp;
+ if (!Global.core.device) {
+ log_error("device is not set");
+ return -1;
+ }
+
lock_path = device_lock(Global.core.device);
if (!lock_path) {
sms_device_close(fd);