Changeset 3618


Ignore:
Timestamp:
Dec 18, 2016, 12:19:56 AM (3 years ago)
Author:
bruno
Message:
  • Fix mr_popup_and_get_string which was using a freed string by newtFormDestroy. String is now duplicated.
Location:
branches/3.2/mondo/src/common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mondo/src/common/libmondo-tools.c

    r3613 r3618  
    983983    }
    984984    run_program_and_log_output("umount `mount | grep cdr | cut -d' ' -f3 | tr '\n' ' '`", 5);
    985     tmp = call_program_and_get_last_line_of_output("mount | grep -E \"cdr(om|w)\"");
     985    tmp = call_program_and_get_last_line_of_output("mount | grep -E 'cdr(om|w)'");
    986986    if (strcmp("", tmp)) {
    987987        if (strstr(tmp, "autofs")) {
  • branches/3.2/mondo/src/common/newt-specific.c

    r3614 r3618  
    768768    b_res = newtRunForm(myForm);
    769769
     770    if (b_res != b_2) {
     771        /*  We need to copy the value as newtFormDestroy will clear entry_value */
     772        mr_asprintf(out, "%s", entry_value);
     773    }
    770774    newtPopHelpLine();
    771775    newtFormDestroy(myForm);
     
    773777    mr_free(blurb);
    774778
    775     if (b_res != b_2) {
    776         out = entry_value;
    777     }
    778779    return(out);
    779780}
Note: See TracChangeset for help on using the changeset viewer.