[Midnightbsd-cvs] src [6973] trunk/lib/libmport/bundle_read_install_pkg.c: handle data as null

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Fri Mar 13 06:57:28 EDT 2015


Revision: 6973
          http://svnweb.midnightbsd.org/src/?rev=6973
Author:   laffer1
Date:     2015-03-13 06:57:27 -0400 (Fri, 13 Mar 2015)
Log Message:
-----------
handle data as null

Modified Paths:
--------------
    trunk/lib/libmport/bundle_read_install_pkg.c

Modified: trunk/lib/libmport/bundle_read_install_pkg.c
===================================================================
--- trunk/lib/libmport/bundle_read_install_pkg.c	2015-03-08 18:12:42 UTC (rev 6972)
+++ trunk/lib/libmport/bundle_read_install_pkg.c	2015-03-13 10:57:27 UTC (rev 6973)
@@ -169,9 +169,14 @@
           
         break;
       case ASSET_CHMOD:
+	printf("asset_chmod %s, %s\n", mode, data);
 	if (mode != NULL)
 		free(mode);
-	mode = strdup(data);
+	/* TODO: should we reset the mode rather than NULL here */
+	if (data == NULL)
+		mode = NULL;
+	else
+		mode = strdup(data);
         break;
       case ASSET_CHOWN:
 	owner = mport_get_uid(data);



More information about the Midnightbsd-cvs mailing list