svn commit: r227966 - stable/9/lib/librt
Konstantin Belousov
kib at FreeBSD.org
Fri Nov 25 10:30:29 UTC 2011
Author: kib
Date: Fri Nov 25 10:30:29 2011
New Revision: 227966
URL: http://svn.freebsd.org/changeset/base/227966
Log:
MFC r227661:
Free unused allocation on error.
Approved by: re (bz)
Modified:
stable/9/lib/librt/timer.c
Directory Properties:
stable/9/lib/librt/ (props changed)
Modified: stable/9/lib/librt/timer.c
==============================================================================
--- stable/9/lib/librt/timer.c Fri Nov 25 10:29:22 2011 (r227965)
+++ stable/9/lib/librt/timer.c Fri Nov 25 10:30:29 2011 (r227966)
@@ -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