libsepol: check correct pointer for oom
Check the actual pointer which memory was assigned to, not its parent array pointer. services.c:810:14: warning: Assigned value is garbage or undefined [core.uninitialized.Assign] **r_buf = **new_buf; ^ ~~~~~~~~~ Acked-by: James Carter <jwcart2@gmail.com> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
This commit is contained in:
parent
6bc2980545
commit
68a29c3aee
|
@ -803,7 +803,7 @@ mls_ops:
|
|||
if (len < 0 || len >= reason_buf_len - reason_buf_used) {
|
||||
new_buf_len = reason_buf_len + REASON_BUF_SIZE;
|
||||
*new_buf = realloc(*r_buf, new_buf_len);
|
||||
if (!new_buf) {
|
||||
if (!*new_buf) {
|
||||
ERR(NULL, "failed to realloc reason buffer");
|
||||
goto out1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue