Fix heap-use-after-free 92/244192/1 accepted/tizen_6.0_unified_hotfix tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.104928 accepted/tizen/6.0/unified/hotfix/20201103.000716 accepted/tizen/unified/20200917.055723 submit/tizen/20200917.013404 submit/tizen_6.0/20201029.205501 submit/tizen_6.0_hotfix/20201102.192901 submit/tizen_6.0_hotfix/20201103.115101 tizen_6.0.m2_release
authorSeonah Moon <seonah1.moon@samsung.com>
Wed, 16 Sep 2020 01:29:33 +0000 (10:29 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Wed, 16 Sep 2020 01:29:42 +0000 (10:29 +0900)
commit4f83ede6ba3f4fb4fa349770c52cc9ce57d0a42e
treec7b6d2f89db3295a7c5332eed809ad86080930d0
parentf1d1309ff5fd4813d8bce2826409c926045d7ac0
Fix heap-use-after-free

In case of below scenario, da_info is freed immediately after cancel
request.

[client request thread]      [http thread]
1. download start
                           2. network doesn't work temporary
                           3. wait for auto retry (pthread_cond_timedwait(cond_http))
4. request cancel
                           5. pthread_cond_signal(cond_http)
                           6. free da_info
7. access to da_info for
   debugging message
   (fault)

Change-Id: I3bf0002e643af77dac17f69c543d29570c1f3cde
agent/download-agent-dl-mgr.c
packaging/download-provider.spec