diff options
author | Adam Jackson <ajax@redhat.com> | 2009-05-08 14:15:21 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2009-05-08 14:15:21 -0400 |
commit | d36a99d961c6649ca1b0319c2aadc6763edb07ad (patch) | |
tree | 5dd7b28ec56eab55806c209d327b03cb49cc54fd /src/xkbconfig.c | |
parent | 29f27b16dbe511a27a0e953b32913f9d9bf24f2d (diff) |
Semi-revert 33b839e16fe681ba915658f824ceb1b252084ea4
_XkbDupString() checks for NULL, strdup doesn't. Still, implement in
terms of real strdup and skip the calloc.
Diffstat (limited to 'src/xkbconfig.c')
-rw-r--r-- | src/xkbconfig.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xkbconfig.c b/src/xkbconfig.c index dd04e81..37272ce 100644 --- a/src/xkbconfig.c +++ b/src/xkbconfig.c @@ -377,7 +377,7 @@ XkbCFAddModByName( XkbConfigRtrnPtr rtrn, last->merge= merge; last->name= NULL; } - last->name= strdup(name); + last->name= _XkbDupString(name); } return last; } @@ -501,7 +501,7 @@ unsigned what; } if (*str!=NULL) _XkbFree(*str); - *str= strdup(val.str); + *str= _XkbDupString(val.str); break; case _XkbCF_InitialMods: case _XkbCF_IgnoreLockMods: @@ -1060,7 +1060,7 @@ DefaultFinish( XkbConfigFieldsPtr fields, return DefaultCleanUp(rtrn); if (what==XkbCF_Check) { if ((rtrn->symbols==NULL)&&(rtrn->phys_symbols!=NULL)) - rtrn->symbols= strdup(rtrn->phys_symbols); + rtrn->symbols= _XkbDupString(rtrn->phys_symbols); } if ((what==XkbCF_Apply)||(what==XkbCF_Check)) { if (xkb && xkb->names && (rtrn->num_unbound_mods>0)) |