Skip to content
  • John Hawthorn's avatar
    d8485906
    Use ruby_strdup/xfree in fast_fallback · d8485906
    John Hawthorn authored
    Any memory allocated with xmalloc needs to be matched with xfree rather
    than plain free.
    
    Ruby unfortunately redefines strdup to be ruby_strdup, which uses
    xmalloc so needs to be xfreed. Previously these were mismatched.
    
    This commit changes the copy to be an explicit ruby_strdup (to avoid
    confusion) and the free to be xfree.
    d8485906
    Use ruby_strdup/xfree in fast_fallback
    John Hawthorn authored
    Any memory allocated with xmalloc needs to be matched with xfree rather
    than plain free.
    
    Ruby unfortunately redefines strdup to be ruby_strdup, which uses
    xmalloc so needs to be xfreed. Previously these were mismatched.
    
    This commit changes the copy to be an explicit ruby_strdup (to avoid
    confusion) and the free to be xfree.
Loading