diff --git a/obexd/src/obex-priv.h b/obexd/src/obex-priv.h
index 0f167ce..265ac8c 100644
--- a/obexd/src/obex-priv.h
+++ b/obexd/src/obex-priv.h
uint8_t cmd;
char *name;
char *type;
- const char *path;
+ char *path;
time_t time;
uint8_t *buf;
int32_t pending;
diff --git a/obexd/src/obex.c b/obexd/src/obex.c
index 38ff438..0f860d8 100644
--- a/obexd/src/obex.c
+++ b/obexd/src/obex.c
g_free(os->buf);
os->buf = NULL;
}
+ if (os->path) {
+ g_free(os->path);
+ os->path = NULL;
+ }
os->driver = NULL;
os->aborted = FALSE;
return -EPERM;
}
- os->path = filename;
+ os->path = g_strdup(filename);
if (!os->buf) {
debug("PUT request checked, no buffered data");