diff options
Diffstat (limited to 'setxkbmap.c')
-rw-r--r-- | setxkbmap.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/setxkbmap.c b/setxkbmap.c index 4f65454..5e906cd 100644 --- a/setxkbmap.c +++ b/setxkbmap.c @@ -666,11 +666,21 @@ stringFromOptions(char *orig, int numNew, char **newOpts) if (orig) { orig = (char *) realloc(orig, len); + if (!orig) + { + ERR("OOM in stringFromOptions\n"); + return NULL; + } nOut = 1; } else { orig = (char *) calloc(len, 1); + if (!orig) + { + ERR("OOM in stringFromOptions\n"); + return NULL; + } nOut = 0; } for (i = 0; i < numNew; i++) |