DragonFly bugs List (threaded) for 2009-12
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: [issue1625] coer dump from hammer info
Sorry, dunno why but I still keep clicking on "Reply" instead of
"Reply all" :-(
2009/12/14 Steve O'Hara-Smith <steve@sohara.org>:
> Hi Matt,
>
> That's exactly what Antonio suggested (off list), I've just tried it
> and it works a treat.
>
> On Mon, 14 Dec 2009 08:07:01 -0800 (PST)
> Matthew Dillon <dillon@apollo.backplane.com> wrote:
>
>>
>> : 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
>> <dillon@backplane.com>
>>
>> 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);
>
>
> --
> Steve O'Hara-Smith | Directable Mirror Arrays
> C:>WIN | A better way to focus the sun
> The computer obeys and wins. | licences available see
> You lose and Bill collects. | http://www.sohara.org/
>
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]