diff options
Diffstat (limited to 'src/filehandler.cc')
-rw-r--r-- | src/filehandler.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/filehandler.cc b/src/filehandler.cc index 915657e..d774487 100644 --- a/src/filehandler.cc +++ b/src/filehandler.cc @@ -7,7 +7,7 @@ Filehandler::init(char *path) { m_file = NULL; m_buffer = NULL; - m_path = path; + asprintf(&m_path, "%s", path); } bool @@ -53,4 +53,5 @@ Filehandler::close(void) { fclose(m_file); free(m_buffer); + free(m_path); } |