Ticket #8283: fix-missing-object_copy.patch

File fix-missing-object_copy.patch, 934 bytes (added by Kohei Takahashi <flast@…>, 10 years ago)
  • engine/modules/path.c

    diff --git a/engine/modules/path.c b/engine/modules/path.c
    index acc9177..ced5e55 100644
    a b LIST * path_exists( FRAME * frame, int flags )  
    1515{
    1616    timestamp time;
    1717    timestamp_from_path( &time, list_front( lol_get( frame->args, 0 ) ) );
    18     return timestamp_empty( &time ) ? L0 : list_new( constant_true );
     18    return timestamp_empty( &time ) ? L0 : list_new( object_copy( constant_true ) );
    1919}
    2020
    2121
  • engine/pathnt.c

    diff --git a/engine/pathnt.c b/engine/pathnt.c
    index fb8c767..a42f870 100644
    a b static path_key_entry * path_key( OBJECT * const path,  
    216216        OBJECT * normalized;
    217217        int normalized_size;
    218218        path_key_entry * nresult;
    219         result->path = path;
     219        result->path = object_copy( path );
    220220        {
    221221            string buf[ 1 ];
    222222            string_copy( buf, object_str( path ) );