kill: Fix free() with bad pointer on SIG-prefixed signal-name
kill -l SIGHUP (or any other signal-name prefixed with "SIG") would cause free() to be called with a bad pointer instead of a pointer to what was allocated. Fix this and add test-case.
This commit is contained in:
committed by
Craig Small
parent
e02d9f554d
commit
95ed10ff43
@ -263,7 +263,7 @@ char *strtosig(const char *restrict s)
|
||||
}
|
||||
}
|
||||
}
|
||||
free(p);
|
||||
free(copy);
|
||||
return converted;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user