public inbox for lvm2-cvs@sourceware.org help / color / mirror / Atom feed
From: agk@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/lib/cache lvmetad.c Date: Fri, 02 Mar 2012 21:24:00 -0000 [thread overview] Message-ID: <20120302212438.17070.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2012-03-02 21:24:38 Modified files: lib/cache : lvmetad.c Log message: missing reply frees Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/cache/lvmetad.c.diff?cvsroot=lvm2&r1=1.15&r2=1.16 --- LVM2/lib/cache/lvmetad.c 2012/03/02 20:46:37 1.15 +++ LVM2/lib/cache/lvmetad.c 2012/03/02 21:24:37 1.16 @@ -208,7 +208,7 @@ log_error(INTERNAL_ERROR "We do not know the format (%s) reported by lvmetad.", fmt_name); - return NULL; + goto out; } fic.type = FMT_INSTANCE_MDAS | FMT_INSTANCE_AUX_MDAS; @@ -216,7 +216,7 @@ fic.context.vg_ref.vg_id = vgid; if (!(fid = fmt->ops->create_instance(fmt, &fic))) - return_NULL; + goto_out; if ((pvcn = dm_config_find_node(top, "metadata/physical_volumes"))) for (pvcn = pvcn->child; pvcn; pvcn = pvcn->sib) @@ -224,21 +224,25 @@ top->key = name; if (!(vg = import_vg_from_config_tree(reply.cft, fid))) - return_NULL; + goto_out; dm_list_iterate_items(pvl, &vg->pvs) { if ((info = lvmcache_info_from_pvid((const char *)&pvl->pv->id, 0))) { pvl->pv->label_sector = lvmcache_get_label(info)->sector; pvl->pv->dev = lvmcache_device(info); - if (!lvmcache_fid_add_mdas_pv(info, fid)) - return_NULL; /* FIXME error path */ + if (!lvmcache_fid_add_mdas_pv(info, fid)) { + vg = NULL; + goto_out; /* FIXME error path */ + } } /* else probably missing */ } lvmcache_update_vg(vg, 0); } +out: daemon_reply_destroy(reply); + return vg; } @@ -285,8 +289,7 @@ } reply = daemon_send_simple(_lvmetad, "vg_update", "vgname = %s", vg->name, - "metadata = %b", strchr(buf, '{'), - NULL); + "metadata = %b", strchr(buf, '{'), NULL); dm_free(buf); if (!_lvmetad_handle_reply(reply, "update VG", vg->name, NULL)) { @@ -294,6 +297,8 @@ return 0; } + daemon_reply_destroy(reply); + n = (vg->fid && vg->fid->metadata_areas_index) ? dm_hash_get_first(vg->fid->metadata_areas_index) : NULL; while (n) {
next reply other threads:[~2012-03-02 21:24 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-03-02 21:24 agk [this message] -- strict thread matches above, loose matches on Subject: below -- 2012-03-14 17:15 zkabelac 2012-03-02 22:44 agk 2012-03-01 20:04 mornfall 2012-02-28 18:23 agk 2012-02-28 11:09 zkabelac 2012-02-27 11:32 zkabelac 2012-02-26 13:42 mornfall 2012-02-26 8:49 mornfall 2012-02-23 19:03 zkabelac
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20120302212438.17070.qmail@sourceware.org \ --to=agk@sourceware.org \ --cc=lvm-devel@redhat.com \ --cc=lvm2-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).