projects
/
ptask-pkg-ubuntu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 0.0.9
[ptask-pkg-ubuntu.git]
/
src
/
ptime.c
diff --git
a/src/ptime.c
b/src/ptime.c
index
2e017fc
..
425e4bb
100644
(file)
--- a/
src/ptime.c
+++ b/
src/ptime.c
@@
-55,9
+55,11
@@
char *tm_to_str(const struct tm *tm)
str = malloc(11);
s = strftime(str, 11, "%Y/%m/%d", tm);
str = malloc(11);
s = strftime(str, 11, "%Y/%m/%d", tm);
- if (s)
+ if (s)
{
return str;
return str;
-
- log_err("Failed to convert time");
- return NULL;
+ } else {
+ log_err("Failed to convert time");
+ free(str);
+ return NULL;
+ }
}
}