Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add CLANG_SANITIZER define
  • Loading branch information
perexg committed Mar 10, 2016
1 parent e549e6a commit 21ce5d3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/httpc.c
Expand Up @@ -1595,7 +1595,13 @@ http_client_close ( http_client_t *hc )
free(hc->hc_bindaddr);
free(hc->hc_rtsp_user);
free(hc->hc_rtsp_pass);
#ifdef CLANG_SANITIZER
pthread_mutex_lock(&http_lock);
#endif
free(hc);
#ifdef CLANG_SANITIZER
pthread_mutex_unlock(&http_lock);
#endif
}

/*
Expand Down
6 changes: 6 additions & 0 deletions src/tvheadend.h
Expand Up @@ -115,6 +115,12 @@ lock_assert0(pthread_mutex_t *l, const char *file, int line)

#define lock_assert(l) lock_assert0(l, __FILE__, __LINE__)

#if defined(__has_feature)
#if __has_feature(address_sanitizer) || __has_feature(thread_sanitizer)
#define CLANG_SANITIZER 1
#endif
#endif

/*
*
*/
Expand Down

0 comments on commit 21ce5d3

Please sign in to comment.