Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/lib/tdb_validate.c

    r590 r745  
    2020 */
    2121
     22#include "includes.h"
     23#include "system/filesys.h"
     24#include "util_tdb.h"
    2225#include "tdb_validate.h"
    23 #include "includes.h"
    2426
    2527/*
     
    282284
    283285        tmp_path = talloc_asprintf(ctx, "%s%s", dst_path, ".tmp");
     286        if (!tmp_path) {
     287                DEBUG(3, ("talloc fail\n"));
     288                goto done;
     289        }
     290
    284291        unlink(tmp_path);
    285292        dst_tdb = tdb_open_log(tmp_path,
     
    356363
    357364        dst_path = talloc_asprintf(ctx, "%s%s", path, suffix);
     365        if (dst_path == NULL) {
     366                DEBUG(3, ("error out of memory\n"));
     367                return ret;
     368        }
    358369
    359370        ret = (rename(path, dst_path) != 0);
     
    395406                char *rotate_path = talloc_asprintf(ctx, "%s%s", dst_path,
    396407                                                    rotate_suffix);
     408                if (rotate_path == NULL) {
     409                        DEBUG(10, ("talloc fail\n"));
     410                        return -1;
     411                }
    397412                DEBUG(10, ("backup of %s failed due to lack of space\n",
    398413                           src_path));
     
    451466
    452467        tdb_path_backup = talloc_asprintf(ctx, "%s%s", tdb_path, backup_suffix);
     468        if (!tdb_path_backup) {
     469                DEBUG(0, ("tdb_validate_and_backup: out of memory\n"));
     470                goto done;
     471        }
    453472
    454473        ret = tdb_validate_open(tdb_path, validate_fn);
Note: See TracChangeset for help on using the changeset viewer.