collaps same repeted task into 2 code paths
authorSimo Sorce <idra@samba.org>
Wed, 9 Apr 2003 17:36:33 +0000 (17:36 +0000)
committerSimo Sorce <idra@samba.org>
Wed, 9 Apr 2003 17:36:33 +0000 (17:36 +0000)
(This used to be commit bc5d1873da187c83a1a19a7560685ed903d37455)

source3/modules/vfs_recycle.c

index d554f4bfddddbb756689f5c894fcdd5218ab3d2c..3a23e1a3655ec7a9efbdb2f5496428ebefb4e397 100644 (file)
@@ -555,11 +555,10 @@ static int recycle_unlink(connection_struct *conn, const char *file_name)
        /* see if we need to recreate the original directory structure in the recycle bin */
        if (recbin->keep_dir_tree == True) {
                asprintf(&temp_name, "%s/%s", recbin->repository, path_name);
-               ALLOC_CHECK(temp_name, done);
        } else {
                temp_name = strdup(recbin->repository);
-               ALLOC_CHECK(temp_name, done);
        }
+       ALLOC_CHECK(temp_name, done);
 
        exist = recycle_directory_exist(conn, temp_name);
        if (exist) {