~mrooney/ecryptfs/nautilus-integration

« back to all changes in this revision

Viewing changes to src/libecryptfs/cipher_list.c

  • Committer: Michal Hlavinka
  • Date: 2009-04-22 09:05:00 UTC
  • mto: This revision was merged to the branch mainline in revision 384.
  • Revision ID: mhlavink@redhat.com-20090422090500-sl9w1s3rbud0kk29
check and fix asprintf's error codes

Change all MOUNT_ERROR return codes for asprintf failure to -ENOMEM. 
Make sure all return codes are reset to zero or overwritten,
because asprintf doesn't return zero for success.

Signed-off-by: Michal Hlavinka <mhlavink@redhat.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
178
178
                        rc = -ENOMEM;
179
179
                        goto out;
180
180
        }
 
181
        rc = 0;
181
182
        if (!(crypto_file = fopen(crypto_full_path, "r"))) {
182
183
                syslog(LOG_WARNING, "%s: Failed to open [%s] for reading; This "
183
184
                       "is not a problem if the Kernel Crypto API is built as "