>From dfaf81c407e69d3a7becf3f2b3c1d6aa979bbd0b Mon, 13 Feb 2012 13:46:30 -0500 From: Daniel U. Thibault <[email protected]> Date: Mon, 13 Feb 2012 13:46:03 -0500 Subject: [PATCH] list.c : enforce error behaviour of get_cmdline_by_pid()
Signed-off-by: Daniel U. Thibault <[email protected]> diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index 9375838..322f695 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -115,6 +115,8 @@ ret = fread(cmdline, 1, PATH_MAX, fp); if (ret < 0) { perror("fread proc list"); + free(cmdline); + cmdline = NULL; } fclose(fp); ------------------------------ Daniel U. Thibault R & D pour la défense Canada - Valcartier (RDDC Valcartier) / Defence R&D Canada - Valcartier (DRDC Valcartier) Système de systèmes (SdS) / System of Systems (SoS) Solutions informatiques et expérimentations (SIE) / Computing Solutions and Experimentations (CSE) 2459 Boul. Pie XI Nord Québec, QC G3J 1X5 CANADA Vox : (418) 844-4000 x4245 Fax : (418) 844-4538 NAC: 918V QSDJ Gouvernement du Canada / Government of Canada <http://www.valcartier.drdc-rddc.gc.ca/> _______________________________________________ lttng-dev mailing list [email protected] http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
