PERFORCE change 31851 for review

Dag-Erling Smorgrav des at FreeBSD.org
Sun May 25 03:52:39 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=31851

Change 31851 by des at des.at.des.thinksec.com on 2003/05/25 03:52:31

	No need to explicitly clear pointers now that we use FREE().

Affected files ...

.. //depot/projects/openpam/lib/openpam_ttyconv.c#19 edit
.. //depot/projects/openpam/lib/pam_get_authtok.c#24 edit

Differences ...

==== //depot/projects/openpam/lib/openpam_ttyconv.c#19 (text+ko) ====

@@ -31,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $P4: //depot/projects/openpam/lib/openpam_ttyconv.c#18 $
+ * $P4: //depot/projects/openpam/lib/openpam_ttyconv.c#19 $
  */
 
 #include <sys/types.h>
@@ -181,7 +181,6 @@
 	while (i)
 		FREE(resp[--i]);
 	FREE(*resp);
-	*resp = NULL;
 	RETURNC(PAM_CONV_ERR);
 }
 

==== //depot/projects/openpam/lib/pam_get_authtok.c#24 (text+ko) ====

@@ -31,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $P4: //depot/projects/openpam/lib/pam_get_authtok.c#23 $
+ * $P4: //depot/projects/openpam/lib/pam_get_authtok.c#24 $
  */
 
 #include <sys/param.h>
@@ -112,10 +112,8 @@
 			FREE(resp);
 			RETURNC(r);
 		}
-		if (strcmp(resp, resp2) != 0) {
+		if (strcmp(resp, resp2) != 0)
 			FREE(resp);
-			resp = NULL;
-		}
 		FREE(resp2);
 	}
 	if (resp == NULL)


More information about the p4-projects mailing list