mirror of
https://github.com/clearml/dropbear
synced 2025-02-12 07:25:30 +00:00
loginrec close fd on error path
This commit is contained in:
parent
f042eb41ab
commit
c8d852caf6
@ -1330,7 +1330,8 @@ 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