summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/atcmd.c6
-rw-r--r--src/utils.c1
2 files changed, 2 insertions, 5 deletions
diff --git a/src/atcmd.c b/src/atcmd.c
index 76ee98c..449518c 100644
--- a/src/atcmd.c
+++ b/src/atcmd.c
@@ -1479,11 +1479,7 @@ int sms_device_close(int fd)
ret = tty_close(fd);
- if (lock_path) {
- unlink(lock_path);
- free(lock_path);
- lock_path = NULL;
- }
+ lock_file = device_unlock(lock_file);
return ret;
}
diff --git a/src/utils.c b/src/utils.c
index 5d46a36..3a18487 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -33,6 +33,7 @@
#include <fcntl.h>
#include <string.h>
#include <linux/limits.h>
+#include <sys/file.h>
#include "utils.h"
#include "log.h"