svn commit: r227661 - head/lib/librt
Konstantin Belousov
kib at FreeBSD.org
Fri Nov 18 09:56:40 UTC 2011
Author: kib
Date: Fri Nov 18 09:56:40 2011
New Revision: 227661
URL: http://svn.freebsd.org/changeset/base/227661
Log:
Free unused allocation on error.
Reported by: slonoman2011 yandex ru
MFC after: 1 week
Modified:
head/lib/librt/timer.c
Modified: head/lib/librt/timer.c
==============================================================================
--- head/lib/librt/timer.c Fri Nov 18 09:55:47 2011 (r227660)
+++ head/lib/librt/timer.c Fri Nov 18 09:56:40 2011 (r227661)
@@ -102,12 +102,14 @@ __timer_create(clockid_t clockid, struct
}
if (__sigev_check_init()) {
+ free(timer);
errno = EINVAL;
return (-1);
}
sn = __sigev_alloc(SI_TIMER, evp, NULL, 0);
if (sn == NULL) {
+ free(timer);
errno = EAGAIN;
return (-1);
}
More information about the svn-src-all
mailing list