[From nobody Wed Oct 9 12:00:19 2013 From: "=?utf-8?b?VG9tw6HFoSBCxb5hdGVr?=" <reviewboard@gallagherhome.com> Precedence: list MIME-Version: 1.0 To: =?utf-8?b?VG9tw6HFoSBCxb5hdGVr?= <tbzatek@redhat.com>, OpenLMI Developers <openlmi-reviews@lists.fedorahosted.org> Date: Tue, 08 Oct 2013 15:57:07 -0000 Reply-To: =?utf-8?b?VG9tw6HFoSBCxb5hdGVr?= <tbzatek@redhat.com>, openlmi-reviews@lists.fedorahosted.org Message-ID: <20131008155707.20614.20649@ex-std-node147.prod.rhcloud.com> Content-Type: multipart/alternative; boundary="===============3195356068083364151==" Subject: Review Request 967: parse_config: Don't reuse already initialized GError struct Message: 7 --===============3195356068083364151== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/967/ ----------------------------------------------------------- Review request for OpenLMI Developers. Repository: openlmi-providers Description ------- parse_config: Don't reuse already initialized GError struct Setting an error on top of an existing error is considered a programmer's bug, possibly leaking memory. So do proper cleanup before reusing that variable. Also, errors set while retrieving keys and values are not checked anywhere so let's just don't set them. Returned NULL values in case of error should be enough to skip the particular value. Diffs ----- src/openlmi.c 25cf57c86b4e05983f376dff69d6d52a25182daa Diff: http://reviewboard-openlmi.rhcloud.com/r/967/diff/ Testing ------- Thanks, Tomáš Bžatek --===============3195356068083364151== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit <html> <body> <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;"> <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;"> <tr> <td> This is an automatically generated e-mail. To reply, visit: <a href="http://reviewboard-openlmi.rhcloud.com/r/967/">http://reviewboard-openlmi.rhcloud.com/r/967/</a> </td> </tr> </table> <br /> <table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://reviewboard-openlmi.rhcloud.com/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;"> <tr> <td> <div>Review request for OpenLMI Developers.</div> <div>By Tomáš Bžatek.</div> <div style="margin-top: 1.5em;"> <b style="color: #575012; font-size: 10pt;">Repository: </b> openlmi-providers </div> <h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1> <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0"> <tr> <td> <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">parse_config: Don&#39;t reuse already initialized GError struct Setting an error on top of an existing error is considered a programmer&#39;s bug, possibly leaking memory. So do proper cleanup before reusing that variable. Also, errors set while retrieving keys and values are not checked anywhere so let&#39;s just don&#39;t set them. Returned NULL values in case of error should be enough to skip the particular value. </pre> </td> </tr> </table> <h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1> <ul style="margin-left: 3em; padding-left: 0;"> <li>src/openlmi.c <span style="color: grey">(25cf57c86b4e05983f376dff69d6d52a25182daa)</span></li> </ul> <p><a href="http://reviewboard-openlmi.rhcloud.com/r/967/diff/" style="margin-left: 3em;">View Diff</a></p> </td> </tr> </table> </div> </body> </html> --===============3195356068083364151==-- ]