Skip to content
  • Dan McGee's avatar
    Fix memory leak in download payload->remote_name · f66f9f11
    Dan McGee authored
    
    
    In the sync code, we explicitly allocated a string for this field, while
    in the dload code itself it was filled in with a pointer to another
    string. This led to a memory leak in the sync download case.
    
    Make remote_name non-const and always explicitly allocate it. This patch
    ensures this as well as uses malloc + snprintf (rather than calloc) in
    several codepaths, and eliminates the only use of PATH_MAX in the
    download code.
    
    Signed-off-by: default avatarDan McGee <dan@archlinux.org>
    f66f9f11