libavcodec/roqaudioenc.c:61: error: Null Dereference
  pointer `avctx->coded_frame` last assigned on line 60 could be null and is dereferenced at line 61, column 5.

libavcodec/roqaudioenc.c:39:1: start of procedure roq_dpcm_encode_init()
37. } ROQDPCMContext;
38. 
39. static av_cold int roq_dpcm_encode_init(AVCodecContext *avctx)
    ^
40. {
41.     ROQDPCMContext *context = avctx->priv_data;

libavcodec/roqaudioenc.c:41:5: 
39. static av_cold int roq_dpcm_encode_init(AVCodecContext *avctx)
40. {
41.     ROQDPCMContext *context = avctx->priv_data;
        ^
42. 
43.     if (avctx->channels > 2) {

libavcodec/roqaudioenc.c:43:9: Taking false branch
41.     ROQDPCMContext *context = avctx->priv_data;
42. 
43.     if (avctx->channels > 2) {
            ^
44.         av_log(avctx, AV_LOG_ERROR, "Audio must be mono or stereo\n");
45.         return -1;

libavcodec/roqaudioenc.c:47:9: Taking false branch
45.         return -1;
46.     }
47.     if (avctx->sample_rate != 22050) {
            ^
48.         av_log(avctx, AV_LOG_ERROR, "Audio must be 22050 Hz\n");
49.         return -1;

libavcodec/roqaudioenc.c:51:9: Taking false branch
49.         return -1;
50.     }
51.     if (avctx->sample_fmt != SAMPLE_FMT_S16) {
            ^
52.         av_log(avctx, AV_LOG_ERROR, "Audio must be signed 16-bit\n");
53.         return -1;

libavcodec/roqaudioenc.c:56:5: 
54.     }
55. 
56.     avctx->frame_size = ROQ_FIRST_FRAME_SIZE;
        ^
57. 
58.     context->lastSample[0] = context->lastSample[1] = 0;

libavcodec/roqaudioenc.c:58:5: 
56.     avctx->frame_size = ROQ_FIRST_FRAME_SIZE;
57. 
58.     context->lastSample[0] = context->lastSample[1] = 0;
        ^
59. 
60.     avctx->coded_frame= avcodec_alloc_frame();

libavcodec/roqaudioenc.c:60:5: 
58.     context->lastSample[0] = context->lastSample[1] = 0;
59. 
60.     avctx->coded_frame= avcodec_alloc_frame();
        ^
61.     avctx->coded_frame->key_frame= 1;
62. 

libavcodec/utils.c:440:1: start of procedure avcodec_alloc_frame()
  438. }
  439. 
  440. AVFrame *avcodec_alloc_frame(void){
       ^
  441.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  442. 

libavcodec/utils.c:441:5: 
  439. 
  440. AVFrame *avcodec_alloc_frame(void){
  441.     AVFrame *pic= av_malloc(sizeof(AVFrame));
           ^
  442. 
  443.     if(pic==NULL) return NULL;

libavutil/mem.c:47:1: start of procedure av_malloc()
    45.    linker will do it automatically. */
    46. 
    47. void *av_malloc(unsigned int size)
        ^
    48. {
    49.     void *ptr = NULL;

libavutil/mem.c:49:5: 
    47. void *av_malloc(unsigned int size)
    48. {
    49.     void *ptr = NULL;
            ^
    50. #if CONFIG_MEMALIGN_HACK
    51.     long diff;

libavutil/mem.c:55:8: Taking false branch
    53. 
    54.     /* let's disallow possible ambiguous cases */
    55.     if(size > (INT_MAX-16) )
               ^
    56.         return NULL;
    57. 

libavutil/mem.c:66:9: Taking false branch
    64.     ((char*)ptr)[-1]= diff;
    65. #elif HAVE_POSIX_MEMALIGN
    66.     if (posix_memalign(&ptr,16,size))
                ^
    67.         ptr = NULL;
    68. #elif HAVE_MEMALIGN

libavutil/mem.c:99:5: 
     97.     ptr = malloc(size);
     98. #endif
     99.     return ptr;
             ^
    100. }
    101. 

libavutil/mem.c:100:1: return from a call to av_malloc
     98. #endif
     99.     return ptr;
    100. }
         ^
    101. 
    102. void *av_realloc(void *ptr, unsigned int size)

libavcodec/utils.c:443:8: Taking true branch
  441.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  442. 
  443.     if(pic==NULL) return NULL;
              ^
  444. 
  445.     avcodec_get_frame_defaults(pic);

libavcodec/utils.c:443:19: 
  441.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  442. 
  443.     if(pic==NULL) return NULL;
                         ^
  444. 
  445.     avcodec_get_frame_defaults(pic);

libavcodec/utils.c:448:1: return from a call to avcodec_alloc_frame
  446. 
  447.     return pic;
  448. }
       ^
  449. 
  450. int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)

libavcodec/roqaudioenc.c:61:5: 
59. 
60.     avctx->coded_frame= avcodec_alloc_frame();
61.     avctx->coded_frame->key_frame= 1;
        ^
62. 
63.     return 0;
