mirror of
https://github.com/clearml/dropbear
synced 2025-04-21 14:44:56 +00:00
loginrec close fd on error path
This commit is contained in:
parent
f042eb41ab
commit
c8d852caf6
@ -1331,6 +1331,7 @@ lastlog_openseek(struct logininfo *li, int *fd, int filemode)
|
|||||||
if ( lseek(*fd, offset, SEEK_SET) != offset ) {
|
if ( lseek(*fd, offset, SEEK_SET) != offset ) {
|
||||||
dropbear_log(LOG_WARNING, "lastlog_openseek: %s->lseek(): %s",
|
dropbear_log(LOG_WARNING, "lastlog_openseek: %s->lseek(): %s",
|
||||||
lastlog_file, strerror(errno));
|
lastlog_file, strerror(errno));
|
||||||
|
m_close(*fd);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user