--- a/perf_examples/notify_group.c
+++ b/perf_examples/notify_group.c
@@ -194,7 +194,8 @@
 	 * destroy our session
 	 */
 	for(i=0; i < num_fds; i++)
-		close(fds[i].fd);
+		if (fds[i].fd > -1)
+			close(fds[i].fd);
 
 	perf_free_fds(fds, num_fds);