:       So in short I'm pretty sure mountedon should not be being freed,
:commenting out the free on line 185 does make hammer info work for me.
:
:-- 
:Steve O'Hara-Smith                          |   Directable Mirror Arrays

    Nice catch.  It looks like the best solution is to strdup() the
    passed path on line 167.  Could you keep the free() and try that
    instead?

                                        -Matt
                                        Matthew Dillon 
                                        <[email protected]>

diff --git a/sbin/hammer/cmd_info.c b/sbin/hammer/cmd_info.c
index bc93cb4..d4f14c6 100644
--- a/sbin/hammer/cmd_info.c
+++ b/sbin/hammer/cmd_info.c
@@ -164,7 +164,7 @@ show_info(char *path)
                if (ioctl(fd, HAMMERIOC_GET_PSEUDOFS, &pfs) >= 0) {
                        ismaster = (pfs_od.mirror_flags & HAMMER_PFSD_SLAVE) ? 
0 : 1;
                        if (pfs_id == 0)
-                               mountedon = path;
+                               mountedon = strdup(path);
                        else
                                mountedon = find_pfs_mount(pfs_id, 
info.vol_fsid, ismaster);
 

Reply via email to