aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-02-08 21:55:52 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-02-08 21:55:52 +0100
commit3f8bba6852e0e9b12ac119dfb83ad0296eada458 (patch)
treea2ffb09b96f2cb6c2f9049f162d8e469d3421d7d
parentV{calendar,event} merged into vcomponent, making it symmetic. (diff)
downloadcalp-3f8bba6852e0e9b12ac119dfb83ad0296eada458.tar.gz
calp-3f8bba6852e0e9b12ac119dfb83ad0296eada458.tar.xz
Fix minor memmory error.
-rw-r--r--vcal.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vcal.c b/vcal.c
index 575d808d..e3a1af9c 100644
--- a/vcal.c
+++ b/vcal.c
@@ -27,6 +27,8 @@ INIT_F(vcomponent, char* filename) {
if (filename != NULL) {
this->filename = calloc(sizeof(*filename), strlen(filename) + 1);
strcpy(this->filename, filename);
+ } else {
+ this->filename = NULL;
}
this->parent = NULL;