diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2022-06-15 10:23:28 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2022-06-15 10:24:01 -0400 |
| commit | ab08ef82307c04c055113515c1893bb741a2f517 (patch) | |
| tree | 7bfceadc2047b3a3a7c501da47a98ee3df66a6cf | |
| parent | 677106de0144865e75720015e1efc0fb5bcc0d03 (diff) | |
lib: stream_dup memory alloc cannot fail
If stream_dup calls stream_new, stream_new can never
return a NULL pointer so the check is unneeded.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| -rw-r--r-- | lib/stream.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/stream.c b/lib/stream.c index c15baa0a2c..011e921c0d 100644 --- a/lib/stream.c +++ b/lib/stream.c @@ -145,8 +145,7 @@ struct stream *stream_dup(const struct stream *s) STREAM_VERIFY_SANE(s); - if ((snew = stream_new(s->endp)) == NULL) - return NULL; + snew = stream_new(s->endp); return (stream_copy(snew, s)); } |
