Date: Fri, 18 Nov 2011 09:56:40 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r227661 - head/lib/librt Message-ID: <201111180956.pAI9ueUs065064@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111180956.pAI9ueUs065064>