Displaying 9 results from an estimated 9 matches for "free_tree".
Did you mean:
free_area
2017 Nov 03
2
[PATCH] diff: avoid potential null pointer dereference on error
If visit_guest() fails, then it returns a null pointer; later on,
free_tree() is called unconditionally on the variables, thus
dereferencing null pointers.
Thus guard the free_tree() invocations.
---
diff/diff.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/diff/diff.c b/diff/diff.c
index 5851a1c9c..1f1ab6933 100644
--- a/diff/diff.c
+++ b/dif...
2017 Nov 03
1
Re: [PATCH] diff: avoid potential null pointer dereference on error
On Fri, Nov 03, 2017 at 12:48:37PM -0500, Eric Blake wrote:
> On 11/03/2017 11:19 AM, Pino Toscano wrote:
> > If visit_guest() fails, then it returns a null pointer; later on,
> > free_tree() is called unconditionally on the variables, thus
> > dereferencing null pointers.
> >
> > Thus guard the free_tree() invocations.
>
> Would it be any better to teach free_tree() to be more free()-like by
> being a no-op on NULL?
Yes, I agree with Eric on this.
Rich....
2017 Nov 03
0
Re: [PATCH] diff: avoid potential null pointer dereference on error
On 11/03/2017 11:19 AM, Pino Toscano wrote:
> If visit_guest() fails, then it returns a null pointer; later on,
> free_tree() is called unconditionally on the variables, thus
> dereferencing null pointers.
>
> Thus guard the free_tree() invocations.
Would it be any better to teach free_tree() to be more free()-like by
being a no-op on NULL?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc....
1999 Dec 23
1
rpart on Alpha under OSF
...R
REMOVE'd the rpart package, downloaded the source rpart_1.0-7.tar from
CRAN and attempted a compilation. Everything works fine until the
linking step, when I get:
f77 -shared -o /users/etptupaf/R/library/rpart/libs/rpart.so anova.o anovapred.o branch.o bsplit.o choose_surg.o fix_cp.o free_tree.o gini.o graycode.o insert_split.o make_cp_list.o make_cp_table.o mysort.o nodesplit.o partition.o poisson.o poissonpred.o pred_rpart.o rpart.o rpcountup.o rplabel.o rpmatrix.o rundown.o rundown2.o s_to_rp.o s_xpred.o surrogate.o xval.o -lUfor -lfor -lFutil -lm -lots -lm
ld:
Warning: Unresolved:
S_...
2010 Mar 20
2
[PATCH 4/4] btrfs-convert: split into convert/.
...DES_PER_GROUP(ext2_fs->super);
- }
-
- *ret_fs = ext2_fs;
- return 0;
-fail:
- return -1;
-}
-
-static int ext2_close(struct convert_fs *fs)
-{
- ext2fs_close((ext2_filsys)fs->privdata);
- return 0;
-}
-
-static int ext2_cache_free_extents(struct convert_fs *fs,
- struct extent_io_tree *free_tree)
-{
- ext2_filsys ext2_fs = fs->privdata;
- int ret = 0;
- blk_t block;
- u64 bytenr;
- u64 blocksize = ext2_fs->blocksize;
-
- block = ext2_fs->super->s_first_data_block;
- for (; block < ext2_fs->super->s_blocks_count; block++) {
- if (ext2fs_fast_test_block_bitmap(ext2_fs-&...
2015 Jan 06
0
[PATCH] virt-diff: add additional ignore options
...,6 +434,8 @@ struct file {
char *path;
struct guestfs_statns *stat;
struct guestfs_xattr_list *xattrs;
+ struct guestfs_statns *stat_orig;
+ struct guestfs_xattr_list *xattrs_orig;
char *csum; /* Checksum. If NULL, use file times and size. */
};
@@ -416,6 +448,8 @@ free_tree (struct tree *t)
free (t->files[i].path);
guestfs_free_statns (t->files[i].stat);
guestfs_free_xattr_list (t->files[i].xattrs);
+ guestfs_free_statns (t->files[i].stat_orig);
+ guestfs_free_xattr_list (t->files[i].xattrs_orig);
free (t->files[i].csum);...
2015 Jan 05
2
Re: [PATCH] virt-diff: add additional ignore options
...visit_entry (const char *dir, const char *name,
> t->files[i].stat = stat;
> t->files[i].xattrs = xattrs;
> t->files[i].csum = csum;
> + t->files[i].stat_orig = stat_copy;
> + t->files[i].xattrs_orig = xattrs_copy;
>
These need to be properly freed in free_tree.
> @@ -778,29 +827,29 @@ output_file (guestfs_h *g, struct file *file)
> filetype = "u";
>
> output_string (filetype);
> - output_int64_perms (file->stat->st_mode & 07777);
> + output_int64_perms (file->stat_orig->st_mode & 07777);
>...
2015 Jan 02
2
(no subject)
Hi, we needed these changes when we had to build a guest image
compatible with a starting guest image but not backed by it in any way?
We needed some tool to check our progress, comparing original and?
rebuilt (from scratch) images, and virt-diff seemed the best option, but?
we had to soften the comparison to reduce the noise in the output. I
added some options to ignore certain informations when
2014 Sep 22
2
[PATCH] New APIs: Implement stat calls that return nanosecond timestamps (RHBZ#1144891).
...string_link (const char *);
@@ -398,7 +398,7 @@ struct tree {
struct file {
char *path;
- struct guestfs_stat *stat;
+ struct guestfs_statns *stat;
struct guestfs_xattr_list *xattrs;
char *csum; /* Checksum. If NULL, use file times and size. */
};
@@ -410,7 +410,7 @@ free_tree (struct tree *t)
for (i = 0; i < t->nr_files; ++i) {
free (t->files[i].path);
- guestfs_free_stat (t->files[i].stat);
+ guestfs_free_statns (t->files[i].stat);
guestfs_free_xattr_list (t->files[i].xattrs);
free (t->files[i].csum);
}
@@ -420,7 +420,7...