eolian: pass rbuf to doc_error
authorDaniel Kolesa <d.kolesa@osg.samsung.com>
Tue, 9 Jun 2015 12:43:36 +0000 (13:43 +0100)
committerDaniel Kolesa <d.kolesa@osg.samsung.com>
Tue, 9 Jun 2015 12:43:36 +0000 (13:43 +0100)
This allows us to correctly free the buffer in error scenarios.

Fixes CID 1304728.

@fix

src/lib/eolian/eo_lexer.c

index 3ed337a..34034f4 100644 (file)
@@ -326,7 +326,7 @@ read_doc(Eo_Lexer *ls, Eo_Token *tok, int line, int column)
      {
         if (!ls->current)
           {
-             doc_error(ls, "unfinished documentation", doc, NULL);
+             doc_error(ls, "unfinished documentation", doc, rbuf);
              return; /* unreachable, for static analysis */
           }