]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
* src/copy.c (copy_reg): Initialize local "con", before calling
authorJim Meyering <jim@meyering.net>
Mon, 2 Apr 2007 20:06:22 +0000 (22:06 +0200)
committerJim Meyering <jim@meyering.net>
Mon, 2 Apr 2007 20:06:22 +0000 (22:06 +0200)
getfscreatecon, in case that function (or its inline stub) does
not set it.

ChangeLog
src/copy.c

index 28af1bcc7a9fb5e3ce77e8f73a6310758d22c247..46b7b02ae0a0cfc676c76cdbb20d27ba3abedf98 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-04-02  Jim Meyering  <jim@meyering.net>
+
+       * src/copy.c (copy_reg): Initialize local "con", before calling
+       getfscreatecon, in case that function (or its inline stub) does
+       not set it.
+
 2007-04-01  Paul Eggert  <eggert@cs.ucla.edu>
 
        * src/ls.c (print_horizontal): Fix bug reported by Mike Frysinger:
index d2088ae464c312135f782e06489f9ea5d41714cb..81636ae7b6445a76b3e84971f09797aec07606c4 100644 (file)
@@ -306,7 +306,7 @@ copy_reg (char const *src_name, char const *dst_name,
         that is used when the destination file doesn't already exist.  */
       if (x->preserve_security_context && 0 <= dest_desc)
        {
-         security_context_t con;
+         security_context_t con = NULL;
          if (getfscreatecon (&con) < 0)
            {
              error (0, errno, _("failed to get file system create context"));