winpr: SetWaitableTimer should not free the handle if it fails
authorKobi Mizrachi <kmizrachi18@gmail.com>
Tue, 17 Dec 2019 08:17:11 +0000 (10:17 +0200)
committerakallabeth <akallabeth@users.noreply.github.com>
Tue, 17 Dec 2019 08:46:00 +0000 (09:46 +0100)
winpr/libwinpr/synch/timer.c

index 255d7f9..d781a98 100644 (file)
@@ -241,10 +241,7 @@ static int InitializeWaitableTimer(WINPR_TIMER* timer)
                timer->fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK);
 
                if (timer->fd <= 0)
-               {
-                       free(timer);
                        return -1;
-               }
 
 #elif defined(__APPLE__)
 #else