Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'maint' into next
[tools/e2fsprogs.git]
/
lib
/
e2p
/
ostype.c
diff --git
a/lib/e2p/ostype.c
b/lib/e2p/ostype.c
index
fe6597d
..
826e080
100644
(file)
--- a/
lib/e2p/ostype.c
+++ b/
lib/e2p/ostype.c
@@
-9,6
+9,7
@@
#include "e2p.h"
#include <string.h>
+#include <stdlib.h>
const char *os_tab[] =
{ "Linux",
@@
-32,7
+33,8
@@
char *e2p_os2string(int os_type)
os = "(unknown os)";
ret = malloc(strlen(os)+1);
- strcpy(ret, os);
+ if (ret)
+ strcpy(ret, os);
return ret;
}