* libmisc/utmp.c: Use xmalloc() rather than malloc().
This commit is contained in:
parent
b05783da32
commit
31906409c8
@ -1,3 +1,7 @@
|
|||||||
|
2009-04-22 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
* libmisc/utmp.c: Use xmalloc() rather than malloc().
|
||||||
|
|
||||||
2009-04-22 Nicolas François <nicolas.francois@centraliens.net>
|
2009-04-22 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* libmisc/utmp.c: The name returned by ttyame() needs to be copied
|
* libmisc/utmp.c: The name returned by ttyame() needs to be copied
|
||||||
|
@ -123,7 +123,7 @@ struct utmp *get_current_utmp (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (NULL != ut) {
|
if (NULL != ut) {
|
||||||
ret = malloc (sizeof (*ret));
|
ret = (struct utmp *) xmalloc (sizeof (*ret));
|
||||||
memcpy (ret, ut, sizeof (*ret));
|
memcpy (ret, ut, sizeof (*ret));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user