]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: fix uninitialized variable in sample
authorKarel Zak <kzak@redhat.com>
Wed, 8 Jun 2011 09:22:25 +0000 (11:22 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 8 Jun 2011 09:22:25 +0000 (11:22 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/mount/samples/mount.c
shlibs/mount/src/context.c

index 0a3c251bd4d09102c4cb7190ccb6a36cb906d162..086391e90c21902639b3b86587e532d6487a91f8 100644 (file)
@@ -101,7 +101,7 @@ static int print_all(struct libmnt_context *cxt, char *pattern, int show_label)
 {
        int rc = 0;
        struct libmnt_table *tb;
-       struct libmnt_iter *itr;
+       struct libmnt_iter *itr = NULL;
        struct libmnt_fs *fs;
        struct libmnt_cache *cache = NULL;
 
index 1968a4b34c32d8ac33e625db74e9f8c1eaa4a972..6b0edc55b59662710a080758a845f744f70a6510 100644 (file)
@@ -712,7 +712,8 @@ int mnt_context_get_fstab(struct libmnt_context *cxt, struct libmnt_table **tb)
  * @cxt: mount context
  * @tb: returns mtab
  *
- * See also mnt_table_parse_mtab() for more details about mtab/mountinfo.
+ * See also mnt_table_parse_mtab() for more details about mtab/mountinfo. The
+ * result will deallocated by mnt_free_context(@cxt).
  *
  * Returns: 0 on success, negative number in case of error.
  */