projects
/
tools
/
librpm-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
881145f
)
fixed problem which could result in strdup(NULL)
author
ewt
<devnull@localhost>
Tue, 30 Jan 1996 04:12:58 +0000
(
04:12
+0000)
committer
ewt
<devnull@localhost>
Tue, 30 Jan 1996 04:12:58 +0000
(
04:12
+0000)
CVS patchset: 252
CVS date: 1996/01/30 04:12:58
lib/var.c
patch
|
blob
|
history
diff --git
a/lib/var.c
b/lib/var.c
index
8d67cb7
..
ce0cadc
100644
(file)
--- a/
lib/var.c
+++ b/
lib/var.c
@@
-21,5
+21,9
@@
void setVar(int var, char *val)
return ; /* XXX should we go harey carey here? */
if (values[var]) free(values[var]);
- values[var] = strdup(val);
+
+ if (val)
+ values[var] = strdup(val);
+ else
+ values[var] = NULL;
}