mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Check the return value of sbuf_finish().
This commit is contained in:
parent
3ff6b7162e
commit
5fcb06f86e
1 changed files with 8 additions and 2 deletions
|
|
@ -4758,7 +4758,10 @@ try_long:
|
|||
|
||||
smp_report_general_sbuf(response, sizeof(*response), sb);
|
||||
|
||||
sbuf_finish(sb);
|
||||
if (sbuf_finish(sb) != 0) {
|
||||
warnx("%s: sbuf_finish", __func__);
|
||||
goto bailout;
|
||||
}
|
||||
|
||||
printf("%s", sbuf_data(sb));
|
||||
|
||||
|
|
@ -5129,7 +5132,10 @@ smpmaninfo(struct cam_device *device, int argc, char **argv,
|
|||
|
||||
smp_report_manuf_info_sbuf(&response, sizeof(response), sb);
|
||||
|
||||
sbuf_finish(sb);
|
||||
if (sbuf_finish(sb) != 0) {
|
||||
warnx("%s: sbuf_finish", __func__);
|
||||
goto bailout;
|
||||
}
|
||||
|
||||
printf("%s", sbuf_data(sb));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue