Dont print to stderr from _set_error if iscsi is NULL
If iscsi is NULL then just do nothing and dont log to stderr. Our caller might have closed stderr or worse, re-used fd 2 for something else.
This commit is contained in:
@@ -255,9 +255,6 @@ iscsi_set_error(struct iscsi_context *iscsi, const char *error_string, ...)
|
||||
strncpy(iscsi->error_string,errstr,MAX_STRING_SIZE);
|
||||
DPRINTF(iscsi,1,"%s",iscsi->error_string);
|
||||
}
|
||||
else {
|
||||
fprintf(stderr,"libiscsi: %s\n", errstr);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user